[MDEV-20509] select count(*) shows errors, maybe it's invalid Created: 2019-09-05 Updated: 2019-09-12 Resolved: 2019-09-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - RocksDB |
| Affects Version/s: | 10.4.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip orleans | Assignee: | Alexander Barkov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux |
||
| Description |
|
This select statement
should never produce thousands of warnings like this:
(thousands of times) |
| Comments |
| Comment by Elena Stepanova [ 2019-09-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Why do you consider it invalid, if you are indeed comparing varchar with int? | |||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philip orleans [ 2019-09-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
The comparison is allowed, conversion is transparent. A zero length string On Wed, Sep 11, 2019, 9:07 AM Elena Stepanova (Jira) <jira@mariadb.org> | |||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-09-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||
|
This script:
produces the following output:
with these warnings:
This is behavior is intentional. It gives a chance to the user to see that some records did not really contain numbers. If you don't want to see these warnings, you can suppress them using a CONTINUE HANDLER:
It produces the same result set but without warnings:
Note, you can see the number of warnings suppressed:
If you don't even want to know the number of warnings suppressed, you can simplify the script to this:
|