Re: MySQL 4.1 and TIMESTAMP Column Types

2003-10-10 Thread Victoria Reznichenko
Scott Brown [EMAIL PROTECTED] wrote:
 DROP TABLE IF EXISTS t;
 CREATE TABLE t (ts TIMESTAMP, i INT);
 INSERT INTO t (i) VALUES(0);
 SELECT * FROM t;
 
 At this point, the timestamp field is un-interpretable. SELECT returns 
 -00-00 9:01 AM
 
 UPDATE t SET i = i + 1;
 SELECT * FROM t;
 
 Returns the same thing; -00-00 9:01 AM. JFYI, none of this is correct, 
 not even the time.
 
 Finally, SELECT @@sql_mode; returns:
 
 ++
 | @@sql_mode |
 ++
 ||
 ++
 1 row in set (0.01 sec)
 
 This is MySQL 4.1.0 alpha max nt, btw.
 
 
 Stranger and stranger...
 
 If I simply convert the column type to DATETIME, all of them are fine, and 
 appear to have been properly stamped. So, my guess is, the error, or 
 whatever it is that is happening, is occurring upon retrieval? Is this 
 actually an ODBC driver issue? I am using the latest MyODBC, beta, I 
 believe, 3.51.06.00 for Windows...
 

I tested with command line client and with my test application that uses ODBC: both 
worked like a charm. Could you test it with command-line client?


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL 4.1 and TIMESTAMP Column Types

2003-10-09 Thread Scott Brown
I am running MySQL 4.1 in a sandbox, trying to test some code against it.

No matter what, even when no value is explicitly applied, or the field is 
not explicitly named in a SQL statement, the TIMESTAMP column refuses to 
update.

I have tested this with several programs written in 3 different languages.

Is this a known issue? Anybody got any pointers to info on this?

Thanks,
--Scott Brown


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 4.1 and TIMESTAMP Column Types

2003-10-09 Thread Paul DuBois
At 14:53 -0700 10/9/03, Scott Brown wrote:
I am running MySQL 4.1 in a sandbox, trying to test some code against it.

No matter what, even when no value is explicitly applied, or the 
field is not explicitly named in a SQL statement, the TIMESTAMP 
column refuses to update.

I have tested this with several programs written in 3 different languages.

Is this a known issue? Anybody got any pointers to info on this?
What happens with this code (use with whatever you wish for the default
database):
DROP TABLE IF EXISTS t;
CREATE TABLE t (ts TIMESTAMP, i INT);
INSERT INTO t (i) VALUES(0);
SELECT * FROM t;
And then what happens with this code, after you wait a few seconds:

UPDATE t SET i = i + 1;
SELECT * FROM t;
Finally, what's the output from this statement:

SELECT @@sql_mode;

--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL 4.1 and TIMESTAMP Column Types

2003-10-09 Thread Scott Brown
DROP TABLE IF EXISTS t;
CREATE TABLE t (ts TIMESTAMP, i INT);
INSERT INTO t (i) VALUES(0);
SELECT * FROM t;
At this point, the timestamp field is un-interpretable. SELECT returns 
-00-00 9:01 AM

UPDATE t SET i = i + 1;
SELECT * FROM t;
Returns the same thing; -00-00 9:01 AM. JFYI, none of this is correct, 
not even the time.

Finally, SELECT @@sql_mode; returns:

++
| @@sql_mode |
++
||
++
1 row in set (0.01 sec)
This is MySQL 4.1.0 alpha max nt, btw.

Stranger and stranger...

If I simply convert the column type to DATETIME, all of them are fine, and 
appear to have been properly stamped. So, my guess is, the error, or 
whatever it is that is happening, is occurring upon retrieval? Is this 
actually an ODBC driver issue? I am using the latest MyODBC, beta, I 
believe, 3.51.06.00 for Windows...

Thanks!
--Scott Brown


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]