-
-
Notifications
You must be signed in to change notification settings - Fork 141
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: logic bug, when executing select * from t where 123 !=(not(not 123)); #1155
Comments
@davidshiz , the result of (not (not 123)) is calced as following: |
@davidshiz you can trace the optimization opers to verify this logical optimization. |
ok,thanks |
ACK |
The result is also empty on official mysql7 mysql> select * from t where 123 !=(not(not 123));
| >find_command [mysql.cc:1117]
| >add_line [mysql.cc:1177]
| | >find_command [mysql.cc:1117]
| | >mysql_real_query [client.c:2520]
| | | >mysql_send_query [client.c:2495]
| | | >cli_advanced_command [client.c:654]
| | | | >net_clear [net.c:197]
| | | | | >vio_blocking [viosocket.c:126]
| | | | | >vio_read_buff [viosocket.c:67]
| | | | | | >vio_read [viosocket.c:36]
| | | | | >vio_blocking [viosocket.c:126]
| | | | >net_write_command [net.c:309]
| | | | >net_flush [net.c:220]
| | | | | >vio_is_blocking [viosocket.c:187]
| | | | | >net_real_write [net.c:431]
| | | | | | >vio_write [viosocket.c:105]
| | >cli_read_query_result [client.c:2420]
| | | >vio_is_blocking [viosocket.c:187]
| | | >vio_read_buff [viosocket.c:67]
| | | | >vio_read [viosocket.c:36]
| | | >vio_read_buff [viosocket.c:67]
| | | >free_old_query [client.c:713]
| | | | >init_alloc_root [my_alloc.c:51]
| | | >cli_read_rows [client.c:1274]
| | | | >vio_is_blocking [viosocket.c:187]
| | | | >vio_read_buff [viosocket.c:67]
| | | | >vio_read_buff [viosocket.c:67]
| | | | >init_alloc_root [my_alloc.c:51]
| | | | >vio_is_blocking [viosocket.c:187]
| | | | >vio_read_buff [viosocket.c:67]
| | | | >vio_read_buff [viosocket.c:67]
| | | >unpack_fields [client.c:1164]
| | >my_realloc [my_realloc.c:30]
| | >my_realloc [my_realloc.c:30]
| | >my_realloc [my_realloc.c:30]
| | >my_realloc [my_realloc.c:30]
| | >my_realloc [my_realloc.c:30]
| | >mysql_store_result [client.c:2538]
| | | >cli_read_rows [client.c:1274]
| | | | >vio_is_blocking [viosocket.c:187]
| | | | >vio_read_buff [viosocket.c:67]
| | | | >vio_read_buff [viosocket.c:67]
| | | | >init_alloc_root [my_alloc.c:51]
Empty set (0.00 sec)
|
mysql 5.7 has this bug, too. change the priority to low. |
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
Both mysql 5.7 innodb and tianmu have this problem
Expected behavior
mysql 8.0
How To Reproduce
Environment
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: