>Description:
Update of one timestamp field in a table can lead to other timestamp fields
being updated in error.
Run the script below. On my 3.23.48 system the output is
gavin@chip : ./show_bug
mysqladmin Ver 8.23 Distrib 3.23.48, for -freebsd4.5 on i386
FreeBSD chip.gav.itworks.com.au 4.5-STABLE FreeBSD 4.5-STABLE #7: Tue Feb 5 22:44:32
EST 2002 [EMAIL PROTECTED]:/home2/src/FreeBSD/src/sys/compile/CHIP
i386
val1 val2
00000000000000 00000000000000
val1 val2
20020212220642 00000000000000
val1 val2
20020212220647 20020212220647
The last line should read
20020212220642 20020212220647
>How-To-Repeat:
Create a new database called test1
Run this script:
--== Script starts ==--
#!/bin/sh
username=root
password=
database=test1
mysqladmin -V
uname -a
mysql -u $username $database << EOF
drop table if exists tab1;
create table tab1 (
val1 timestamp,
val2 timestamp
);
insert into tab1 values (0,0);
select * from tab1;
EOF
mysql -u $username $database << EOF
update tab1 set val1=now();
select * from tab1;
EOF
sleep 5
mysql -u $username $database << EOF
update tab1 set val2=now();
select * from tab1;
EOF
--== Script end ==--
>Fix:
>Submitter-Id: <submitter ID>
>Originator: Gavin Cameron
>Organization:
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:
>Severity:
>Priority:
>Category: mysql
>Class:
>Release: mysql-3.23.48 (FreeBSD port: mysql-server-3.23.48)
>Environment:
System: FreeBSD chip.gav.itworks.com.au 4.5-STABLE FreeBSD 4.5-STABLE #7: Tue Feb 5
22:44:32 EST 2002
[EMAIL PROTECTED]:/home2/src/FreeBSD/src/sys/compile/CHIP i386
Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD]
Compilation info: CC='cc' CFLAGS='-O -pipe ' CXX='cc' CXXFLAGS='-O -pipe
-felide-constructors -fno-rtti -fno-exceptions' LDFLAGS=''
LIBC:
-r--r--r-- 1 root wheel 1208106 Feb 3 20:29 /usr/lib/libc.a
lrwxr-xr-x 1 root wheel 9 Feb 3 20:29 /usr/lib/libc.so -> libc.so.4
-r--r--r-- 1 root wheel 573792 Feb 3 20:29 /usr/lib/libc.so.4
Configure command: ./configure --localstatedir=/var/db/mysql --without-perl
--without-debug --without-readline --without-bench --with-mit-threads=no
--with-libwrap --with-low-memory '--with-comment=FreeBSD port: mysql-server-3.23.48'
--enable-assembler --with-berkeley-db --with-innodb --prefix=/usr/local
i386--freebsd4.5
Perl: This is perl, version 5.005_03 built for i386-freebsd
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php