[Gambas-user] Re; MySQL "timestamp"

Benoit Minisini gambas at ...1...
Tue Jul 17 17:02:38 CEST 2007


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=@...1729... */;
> /*!40101 SET SQL_MODE=@...1730... */;
> /*!40014 SET FOREIGN_KEY_CHECKS=@...1731... */;
> /*!40014 SET UNIQUE_CHECKS=@...1732... */;
> /*!40101 SET CHARACTER_SET_CLIENT=@...1733... */;
> /*!40101 SET CHARACTER_SET_RESULTS=@...1734... */;
> /*!40101 SET COLLATION_CONNECTION=@...1735... */;
> /*!40111 SET SQL_NOTES=@...1736... */;
> -- 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




More information about the User mailing list