Bug #1512 | Timestamp not updated in temporary tables | ||
---|---|---|---|
Submitted: | 9 Oct 2003 13:09 | Modified: | 16 Oct 2003 22:07 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | all | OS: | Linux (linux) |
Assigned to: | CPU Architecture: | Any |
[9 Oct 2003 13:09]
[ name withheld ]
[14 Oct 2003 6:23]
Alexander Keremidarski
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to 'Open'. Thank you for your interest in MySQL. Please tell us what MySQL version you use. I wasn't able to repeat this bug with 4.0.15
[15 Oct 2003 6:01]
[ name withheld ]
This bug is repeatable on my systems (v3.23.58 and v3.23.55-Max), and has been repeated on others (in the alt.php.sql newsgroup) systems as well. I believe it has something to do with the create...select process. Run this script to recreate: create database bug_test; use bug_test; create table real_table(ts timestamp(4), i integer); insert into real_table values('2001-01-01',100); insert into real_table values('2001-02-02',200); insert into real_table values('2001-03-03',300); select * from real_table; create temporary table temp_table select * from real_table; update temp_table set i = i * 2; select * from temp_table;
[16 Oct 2003 22:07]
Alexander Keremidarski
Thanks. I was able to get same result under 3.23 with your queries. Relevant part: mysql> select * from temp_table; +------+------+ | ts | i | +------+------+ | 0101 | 200 | | 0102 | 400 | | 0103 | 600 | +------+------+ 3 rows in set (0.00 sec) mysql> update temp_table set i = i * 2; Query OK, 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> select * from temp_table; +------+------+ | ts | i | +------+------+ | 0101 | 400 | | 0102 | 800 | | 0103 | 1200 | +------+------+ Howevere this 3.23 only behaviour. Under 4.0 result is: mysql> select * from real_table; +------+------+ | ts | i | +------+------+ | 0101 | 100 | | 0102 | 200 | | 0103 | 300 | +------+------+ 3 rows in set (0.00 sec) mysql> update temp_table set i = i * 2; Query OK, 3 rows affected (0.00 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> select * from real_table; +------+------+ | ts | i | +------+------+ | 0101 | 100 | | 0102 | 200 | | 0103 | 300 | +------+------+ 3 rows in set (0.00 sec) As 3.23 is in phasing out stage we fix only critical bugs there like server crashes or security related. Consider upgrading to 4.0