http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2204 *** shadow/2204 Sat Jun 16 12:56:10 2001 --- shadow/2204.tmp.6882 Wed Jun 20 15:55:23 2001 *************** *** 9,15 **** +----------------------------------------------------------------------------+ | Assigned To: [EMAIL PROTECTED] | | Reported By: [EMAIL PROTECTED] | ! | CC list: Cc: | +----------------------------------------------------------------------------+ | URL: | +============================================================================+ --- 9,15 ---- +----------------------------------------------------------------------------+ | Assigned To: [EMAIL PROTECTED] | | Reported By: [EMAIL PROTECTED] | ! | CC list: Cc: [EMAIL PROTECTED],[EMAIL PROTECTED] | +----------------------------------------------------------------------------+ | URL: | +============================================================================+ *************** *** 79,81 **** --- 79,129 ---- { isNotNull = true; } + + + ------- Additional Comments From [EMAIL PROTECTED] 2001-06-20 15:55 ------- + This is tricky; using MySQL as a use case: + + Though MySQL does not allow tables which define columns having auto_increment + columns, I can execute SQL which sets a keyed, auto_increment column to null. + MySQL interprets this by setting the auto_incremented value to zero. Because + null can be used as a valid SQL value for the column, do we really want to + disallow null based on Torque XML schema auto_increment or key status? I'm not + sure which way to go with this one. Comments from the dev list are much + appreciated. + + Here's the demonstration: + + mysql> create table Foo ( id int auto_increment not null, index(id) ); + Query OK, 0 rows affected (0.00 sec) + + mysql> desc Foo; + +-------+---------+------+-----+---------+----------------+ + | Field | Type | Null | Key | Default | Extra | + +-------+---------+------+-----+---------+----------------+ + | id | int(11) | | MUL | 0 | auto_increment | + +-------+---------+------+-----+---------+----------------+ + 1 row in set (0.00 sec) + + mysql> insert into Foo values (7); + Query OK, 1 row affected (0.00 sec) + + mysql> select * from Foo; + +----+ + | id | + +----+ + | 7 | + +----+ + 1 row in set (0.00 sec) + + mysql> update Foo set id=null; + Query OK, 1 row affected (0.00 sec) + Rows matched: 1 Changed: 1 Warnings: 1 + + mysql> select * from Foo; + +----+ + | id | + +----+ + | 0 | + +----+ + 1 row in set (0.00 sec) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
