List:General Discussion« Previous MessageNext Message »
From:Mike Wexler Date:April 2 1999 5:48pm
Subject:TIMESTAMP changes when no other fields have change
View as plain text  
>Submitter-Id:	<submitter ID>
>Originator:	Mike Wexler
>Organization:
 TIAS
>MySQL support: none
>Synopsis:	TIMESTAMP changes when no other fields have change
>Severity:	non-critical
>Priority:	medium
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.21.30 (Source distribution)
>Server: /usr/bin/mysqladmin  Ver 6.9 Distrib 3.21.30, for pc-linux-gnu on i586
TCX Datakonsult AB, by Monty

Server version		3.21.30-log
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/var/lib/mysql/mysql.sock
Uptime:			16 hours 20 min 20 sec

Running threads: 1  Questions: 99619  Opened_tables: 31  Reloads: 1  Open tables: 3
>Environment:
	
System: Linux rolex.tias.com 2.0.34 #1 Thu Feb 4 11:29:38 PST 1999 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
Compilation info: CC: gcc CFLAGS: @CFLAGS@ CXX: @CXX@ CXXFLAGS: @CXXFLAGS@ LDFLAGS:
@LDFLAGS@
Perl: This is perl, version 5.005_02 built for i686-linux

>Description:
	When the attach (pseudo)SQL is run the stamp field changes each
	time UPDATE is called. This occurs even though no field values
	have changed.

>How-To-Repeat:
	use test;
	CREATE TABLE myTable ( 
	    value TEXT NOT NULL,
	    id VARCHAR(32) NOT NULL,
	    stamp timestamp,
	    PRIMARY KEY (id)
	);
	INSERT INTO myTable(value, id) VALUES ("my value", "myKey");
	SELECT stamp FROM myTable WHERE id="myKey";

	# Time consuming operation here

	UPDATE myTable SET value="my value" WHERE id="myKey";
	SELECT stamp FROM myTable WHERE id="myKey";

	# Time consuming operation here

	UPDATE myTable SET value="my value" WHERE id="myKey";
	SELECT stamp FROM myTable WHERE id="myKey";

	DROP TABLE myTable;


>Fix:
	
Thread
TIMESTAMP changes when no other fields have changeMike Wexler2 Apr
Re: TIMESTAMP changes when no other fields have changeFred Lindberg2 Apr
  • Re: TIMESTAMP changes when no other fields have changeMike Wexler)2 Apr
  • Re: TIMESTAMP changes when no other fields have changePaul DuBois2 Apr
    • Re: TIMESTAMP changes when no other fields have changeMichael Widenius3 Apr