-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: When using where to filter hexadecimal formate data, return incorrect #1625
Comments
relevant issue #1362. |
When insert value |
…return incorrect(stoneatom#1625) The if block located in `storage/tianmu/core/query.cpp:1033&1105` are same and unnecessary, `Item_hex_string` will be transformed into `Item_int` here eventually leading to bugs.
This bug roots in if (an_arg->type() == Item::VARBIN_ITEM) {
String str;
an_arg->val_str(&str); // sets null_value
if (!an_arg->null_value) {
if (an_arg->max_length <= 8) {
Item *int_item = new Item_int((ulonglong)an_arg->val_int());
MysqlExpression *mysql_expression = nullptr;
MysqlExpression::Item2VarID item2varid;
gc_expressions.push_back(mysql_expression = new MysqlExpression(int_item, item2varid));
vc.n = VirtualColumnAlreadyExists(tmp_table, mysql_expression);
if (vc.n == common::NULL_VALUE_32) {
cq->CreateVirtualColumn(vc, tmp_table, mysql_expression);
tab_id2expression.insert(std::make_pair(tmp_table, std::make_pair(vc.n, mysql_expression)));
}
} else
return QueryRouteTo::kToMySQL; // too large binary to be treated
// as BIGINT
} else {
return QueryRouteTo::kToMySQL;
}
}
|
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
…return incorrect(stoneatom#1625) `Item_hex_string` will be transformed to `Item_int` here eventually leading to wrong type of item in evaluation. Only `Item_hex_string` and Comparison context is `REAL_RESULT` need transformation.
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
Expected behavior
How To Reproduce
No response
Environment
root@ub01:/stonedb57/install/bin# ./mysqld --version ./mysqld Ver 5.7.36-StoneDB-v1.0.3 for Linux on x86_64 (build-) build information as follow: Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev Branch name: stonedb-5.7-dev Last commit ID: 31919be01 Last commit time: Date: Thu Apr 20 10:19:54 2023 +0800 Build time: Date: Mon Apr 24 11:43:10 CST 2023
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: