[MDEV-3079] LP:806057 - Wrong result with virtual columns + USING Created: 2011-07-05 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Repeatable in maria-5.3, maria-5.2. The following query: SELECT * FROM t1 JOIN t2 USING (f3); returns rows even though there are no rows in the table for which t1.f3 = t2.f3 . All other forms of the query, that is SELECT without a * or ON instead of USING return correct results. Also, it seems that the table needs to be populated with INSERT statements that also insert into the virtual column, such as those that are produced by mysqldump. Test case: CREATE TABLE t1 ( CREATE TABLE t2 ( INSERT INTO t2 VALUES (187,187),(9,9),(187,187),(9,9); SELECT * FROM t1 JOIN t2 USING (f3); explain: id select_type table type possible_keys key key_len ref rows Extra bzr version-info |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2012-02-20 ] |
|
Launchpad bug id: 806057 |