CSEMike / OneSwarm-Community-Server

The reference implementation of the community server for the OneSwarm P2P software client.
http://oneswarm.cs.washington.edu/
GNU General Public License v2.0
10 stars 3 forks source link

Error while creating initial SQL Tables #1

Closed rb2k closed 14 years ago

rb2k commented 15 years ago
mysql> CREATE TABLE registered_keys ( public_key VARCHAR(4096) CHARSET ascii NOT NULL, key_hash INTEGER, created_by_account BIGINT UNSIGNED, nick VARCHAR(256) CHARSET utf8 NOT NULL, registration_timestamp TIMESTAMP DEFAULT NOW(), last_refresh_timestamp TIMESTAMP DEFAULT '1970-1-1 0:0:0', registration_ip VARCHAR(16) NOT NULL, db_id SERIAL PRIMARY KEY, CONSTRAINT UniqueKey UNIQUE(public_key(767)), FOREIGN KEY(created_by_account) REFERENCES valid_accounts(uid) ON DELETE CASCADE ) TYPE=INNODB;

ERROR 1067 (42000): Invalid default value for 'last_refresh_timestamp'

CSEMike commented 15 years ago

what version of MySQL are you using?

rb2k commented 15 years ago

mysql --version mysql Ver 14.12 Distrib 5.0.75, for debian-linux-gnu (i486) using readline 5.2

CSEMike commented 15 years ago

is it possible for you to upgrade to 5.1? (or 5.0.77, which is the earlier version we tested with)

rb2k commented 15 years ago

I just upgraded, but sadly I don't have the time at the moment to backup, test and reinsert. But looking at http://bugs.mysql.com/bug.php?id=27645 respective http://dev.mysql.com/doc/refman/5.1/en/data-type-defaults.html , there seems to be a problem with having now() as a deafult

CSEMike commented 14 years ago

fixed in 0.7pre4