Re: Some datagard errors
Tarjei Huse <tarjei-y/[email protected]>
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <1138463157.5057.87.camel@localhost> |
On fre, 2006-01-27 at 10:19 +0100, Piotras wrote: > Tarjei Huse <tarjei-y/[email protected]> wrote: > > > Hi, I'm not sure how importen they are, but while running a datagard > > update I get these errors: > > sbin/datagard: line 765: [: -eq: unary operator expected > > This is ML check ( IIRC ) , and I can not locate the source of this error :/ > > > and: > > ERROR 1067 (42000) at line 1: Invalid default value for > > 'metadata_hidden' > > Can someone point me to good ANSI SQL docs? > Something which is supported by MySQL 4.0, 4.1 and 5.x. According to this: http://dev.mysql.com/doc/refman/4.1/en/numeric-type-overview.html BOOL, BOOLEAN These types are synonyms for TINYINT(1). The BOOLEAN synonym was added in MySQL 4.1.0. A value of zero is considered false. Non-zero values are considered true. Using 0 instead of 'FALSE' should fix the problem. That worked on 1.5 at least as I patched dg my self. This patch solved it: --- /home/tarjei/Midgard_build/Midgard_AllinOne-1.8-alpha1/midgard-data-1.8-alpha1/midgard/datagard/lib.postinst 2006-01-28 13:15:12.000000000 +0100 +++ share/midgard/datagard/lib.postinst 2006-01-28 14:59:00.000000000 +0100 @@ -669,8 +669,8 @@ $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_author varchar(80) NOT NULL default '')" $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_schedule_start datetime NOT NULL default '0000-00-00 00:00:00')" $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_schedule_end datetime NOT NULL default '0000-00-00 00:00:00')" - $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_hidden BOOL default 'FALSE')" - $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_nav_noentry BOOL default 'FALSE')" + $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_hidden BOOL default 0)" + $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (metadata_nav_noentry BOOL default 0)" $mysqlcmd -v -f -D $DB -e "ALTER table $_TABLE ADD (guid varchar(80) NOT NULL default '')" $mysqlcmd -D $DB -e "ALTER table $_TABLE ADD (metadata_size int(11) NOT NULL default '0')" Tarjei > > > This is using Mysql 1.5. > > 5.1 ? > > Piotras > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe-b5ZhpPVuLA+tlBvVaVFjCkB+6BGkLq7r@public.gmane.org > For additional commands, e-mail: [email protected] > -- Tarjei Huse <tarjei-y/[email protected]>