[CP] [CP] Support set names with variables

This commit is contained in:
wjhh2008
2024-03-28 09:46:01 +00:00
committed by ob-robot
parent cb545cb059
commit 72302550bb
9 changed files with 187 additions and 83 deletions

View File

@ -2612,58 +2612,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_CHAR_CHARSET], str_value_=[latin1], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_NAMES], str_value_=[], value=[9223372036854775807]
|--[0],[T_CHAR_CHARSET], str_value_=[latin1], value=[9223372036854775807]
************** Case 131 ***************
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 132 ***************
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_CHAR_CHARSET], 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_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
************** Case 133 ***************
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_CHAR_CHARSET], 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_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
|--[1],[T_COLLATION], str_value_=[utf8_general_ci], value=[9223372036854775807]
************** Case 134 ***************
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_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_CHARSET], str_value_=[], value=[9223372036854775807]
|--[0],[T_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
************** Case 135 ***************
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 136 ***************
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_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
|--[0],[T_VARIABLE_SET], str_value_=[], value=[0]
|--[0],[T_SET_CHARSET], str_value_=[], value=[9223372036854775807]
|--[0],[T_CHAR_CHARSET], str_value_=[utf8], value=[9223372036854775807]
************** Case 137 ***************
select _utf8 'abc', _utf8mb4 'def' collate utf8mb4_general_ci from t1 where c1 collate utf8_bin = 'xyz' collate utf8_bin;

View File

@ -17428,18 +17428,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_CHAR_CHARSET",
"type":"T_SET_NAMES",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_CHAR_CHARSET",
"int_val":9223372036854775807,
"str_len":6,
"str_val":"latin1"
},
{ }
]
}
]
}
]
@ -17454,18 +17462,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"
},
{ }
]
}
]
}
]
@ -17480,22 +17496,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_CHAR_CHARSET",
"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_CHAR_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
}
]
}
]
}
@ -17511,22 +17535,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_CHAR_CHARSET",
"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_CHAR_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
},
{
"type":"T_COLLATION",
"int_val":9223372036854775807,
"str_len":15,
"str_val":"utf8_general_ci"
}
]
}
]
}
@ -17542,16 +17574,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_CHAR_CHARSET",
"type":"T_SET_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_CHAR_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
}
]
}
]
}
@ -17567,16 +17607,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"
}
]
}
]
}
@ -17592,16 +17640,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_CHAR_CHARSET",
"type":"T_SET_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
"str_len":0,
"str_val":"",
"children": [
{
"type":"T_CHAR_CHARSET",
"int_val":9223372036854775807,
"str_len":4,
"str_val":"utf8"
}
]
}
]
}