support set names/charset and variables in one sql

This commit is contained in:
st0
2021-11-09 10:48:59 +08:00
committed by LINxiansheng
parent fa9b5fdfc0
commit 878c594b56
31 changed files with 21749 additions and 21858 deletions

View File

@ -2620,58 +2620,65 @@ set names latin1;
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_NAMES], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[latin1], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_NAMES], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[latin1], value=[9223372036854775807]
************** Case 126 ***************
set names 'latin1';
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_NAMES], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[latin1], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_NAMES], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[latin1], value=[9223372036854775807]
************** Case 127 ***************
set names utf8 collate 'utf8_general_ci';
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_NAMES], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_NAMES], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
************** Case 128 ***************
set names utf8 collate utf8_general_ci;
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_NAMES], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_NAMES], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
************** Case 129 ***************
set character set utf8;
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_CHARSET], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_CHARSET], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
************** Case 130 ***************
set character set 'utf8';
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_CHARSET], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_CHARSET], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
************** Case 131 ***************
set charset utf8;
question_mask_size: 0
|--[0],[T_STMT_LIST], str_value_=[], value=[9223372036854775807]
|--[0],[T_SET_CHARSET], str_value_=[], value=[0]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_CHARSET], str_value_=[], value=[9223372036854775807]
|--[0],[T_VARCHAR], str_value_=[utf8], value=[9223372036854775807]
************** Case 132 ***************
select _utf8 'abc', _utf8mb4 'def' collate utf8mb4_general_ci from t1 where c1 collate utf8_bin = 'xyz' collate utf8_bin;

View File

@ -17496,18 +17496,26 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_NAMES",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_NAMES",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
]
}
]
}
]
@ -17522,18 +17530,26 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_NAMES",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_NAMES",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
]
}
]
}
]
@ -17548,22 +17564,30 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_NAMES",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_NAMES",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
}
]
}
]
}
@ -17579,22 +17603,30 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_NAMES",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_NAMES",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
}
]
}
]
}
@ -17610,16 +17642,24 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_CHARSET",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
}
]
}
]
}
@ -17635,16 +17675,24 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_CHARSET",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
}
]
}
]
}
@ -17660,16 +17708,24 @@ question_mask_size: 0
"str_val":"",
"children": [
{
"type":"T_SET_CHARSET",
"type":"T_VARIABLE_SET",
"int_val":0,
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"type":"T_SET_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_VARCHAR",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
}
]
}
]
}