[Gambas-user] Re; MySQL "timestamp"

Gareth Bult gareth at ...1689...
Tue Jul 17 17:10:48 CEST 2007


Sorry,

I wasn't expecting you to import it into a real database .. I get the same problem on any timestamp field .. I don't believe the problem is specific to this table ...

(My means of testing is to add a 'timestamp' field to a table, read a row, then stop it in the debugger ..)

Gareth.

--
Gareth Bult, Encryptec Limited
Tel: 0845 25 77033, Mob: 07891 389657
Email: gareth at ...1689... 
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.

----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Tuesday, July 17, 2007 4:02:38 PM (GMT) Europe/London
Subject: Re: [Gambas-user] Re; MySQL "timestamp"

On mardi 17 juillet 2007, Gareth Bult wrote:
> -- MySQL dump 10.11
> --
> -- Host: localhost    Database: axis
> -- ------------------------------------------------------
> -- Server version       5.0.38-Ubuntu_0ubuntu1-log
>
> /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
> /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
> /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
> /*!40101 SET NAMES utf8 */;
> /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
> /*!40103 SET TIME_ZONE='+00:00' */;
> /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
> /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
> FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
> SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET
> @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
>
> --
> -- Table structure for table `cache`
> --
>
> DROP TABLE IF EXISTS `cache`;
> CREATE TABLE `cache` (
>   `id` int(11) NOT NULL,
>   `camera` tinyint(1) NOT NULL,
>   `stamp` timestamp NULL default NULL,
>   `event` enum('End','Start') default NULL,
>   `image` mediumblob,
>   KEY `event` (`event`)
> ) ENGINE=MyISAM AUTO_INCREMENT=712 DEFAULT CHARSET=latin1;
>
> ---- Table structure for table `frames`
> --
> DROP TABLE IF EXISTS `frames`;
> CREATE TABLE `frames` (  `id` int(11) NOT NULL auto_increment,  `camera`
> tinyint(1) NOT NULL,  `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP
> on update CURRENT_TIMESTAMP,  `event` enum('End','Start') default NULL,
>  `image` mediumblob,  PRIMARY KEY  (`id`),  KEY `event` (`event`))
> ENGINE=MyISAM AUTO_INCREMENT=712 DEFAULT CHARSET=latin1;
>
> ---- Dumping data for table `frames`        
> --LOCK TABLES `frames` WRITE;
> /*!40000 ALTER TABLE `frames` DISABLE KEYS */;
> INSERT INTO `frames` VALUES (1,0,'2007-07-16 16:55:40',NULL,NULL)
> /*!40000 ALTER TABLE `frames` ENABLE KEYS */;
> UNLOCK TABLES;
> /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
> /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
> /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
> /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
> /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
> /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
> /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
> -- Dump completed on 2007-07-17 14:04:45

This is syntactically incorrect, and it took me a quarter to fix it, because 
mysql error messages are worse than the g++ ones (yes, it is possible). A ';' 
was missing, and spaces were replaced by "other" space characters that mysql 
didn't like.

Next time, please send the dump as a file attachment!

Regards,

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list