>>>>> On Wed, 4 Jan 2006 20:24:37 +0100, Kern Sibbald <[EMAIL PROTECTED]> said:
Kern> On Wednesday 04 January 2006 19:36, Martin Simmons wrote: >> Rather, it is caused by the REFERENCES >> and NOT NULL options such as this one: >> >> CREATE TABLE Job ( >> ... >> ClientId INTEGER NOT NULL REFERENCES Client, >> ... >> } >> >> When the job record is first inserted, the ClientId is unspecified, which >> leads to a consistency error when MySQL is running in strict mode. Kern> Yes, this is possible. Based on MySQL, I expected NOT NULL to at a minimum Kern> insert a 0, but apparently that is not standard SQL. More correct for the Kern> above would be: Kern> CREATE TABLE Job ( Kern> ... Kern> ClientId INTEGER REFERENCES Client default 0, Kern> ... Kern> } Kern> or whatever silly SQL syntax is acceptable. Yes, something like that. I think the REFERENCES clause will have to go too, unless there is a dummy client 0. __Martin ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users