Bug #11298 insert into select from VIEW produces incorrect result when using ORDER BY
| Submitted: | 13 Jun 2005 20:07 | Modified: | 22 Jun 2005 0:17 |
|---|---|---|---|
| Reporter: | Stefan Bähring | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.6 | OS: | Linux (linux) |
| Assigned to: | Evgeny Potemkin | CPU Architecture: | Any |
[13 Jun 2005 20:07]
Stefan Bähring
[15 Jun 2005 7:24]
Aleksey Kishkin
mysql> SELECT * from v_test where value_b='black' ORDER BY value_c; +------+------------+---------+---------+ | id_a | value_a | value_b | value_c | +------+------------+---------+---------+ | 3 | AUDI | black | 150PS | | 4 | Alfa Romeo | black | 240PS | | 5 | Ferrari | black | 450PS | +------+------------+---------+---------+ 3 rows in set (0.00 sec) mysql> insert into t_car SELECT * from v_test where value_b='black' ORDER BY value_c; Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> select * from t_car; +----+---------+-------+-------+ | id | cart | color | power | +----+---------+-------+-------+ | 5 | Ferrari | black | 450PS | | 5 | Ferrari | black | 450PS | | 5 | Ferrari | black | 450PS | +----+---------+-------+-------+ 3 rows in set (0.00 sec)
[18 Jun 2005 15:10]
Evgeny Potemkin
Insert were inserting data from last record fetched instead of inserting from temporary table.
[18 Jun 2005 15:49]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/26152
[21 Jun 2005 20:53]
Evgeny Potemkin
Fixed in 5.0.8, cset 1.1976
[22 Jun 2005 0:17]
Mike Hillyer
Documented in 5.0.8 changelog: <listitem><para>INSERT into SELECT from VIEW produces incorrect result when using ORDER BY. (Bug #11298)</para></listitem>
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.