1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix of bug 390: primary key now implies (silently) NOT NULL for key fields.

This commit is contained in:
unknown
2003-05-13 19:16:30 +02:00
parent 4ccf66df87
commit 563c32ccd1
5 changed files with 24 additions and 11 deletions

View File

@@ -598,8 +598,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
{
if (key->type == Key::PRIMARY)
{
my_error(ER_PRIMARY_CANT_HAVE_NULL, MYF(0));
DBUG_RETURN(-1);
/* Implicitly set primary key fields to NOT NULL for ISO conf. */
sql_field->flags|= NOT_NULL_FLAG;
sql_field->pack_flag&= ~FIELDFLAG_MAYBE_NULL;
}
if (!(file->table_flags() & HA_NULL_KEY))
{