From 81f99b95f15a25879ef1c1cb8e3fe4a554f4e759 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 25 Jun 2006 22:56:10 +0400 Subject: [PATCH] table.cc, func_time.result: After merge fix mysql-test/r/func_time.result: After merge fix sql/table.cc: After merge fix --- mysql-test/r/func_time.result | 8 ++++---- sql/table.cc | 22 ---------------------- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index e8c00a87896..d5cafd04c08 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -799,10 +799,10 @@ sec_to_time(1) + 0, from_unixtime(1) + 0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `now() - now()` double(23,6) NOT NULL default '0.000000', - `curtime() - curtime()` double(23,6) NOT NULL default '0.000000', - `sec_to_time(1) + 0` double(23,6) default NULL, - `from_unixtime(1) + 0` double(23,6) default NULL + `now() - now()` double(23,6) NOT NULL DEFAULT '0.000000', + `curtime() - curtime()` double(23,6) NOT NULL DEFAULT '0.000000', + `sec_to_time(1) + 0` double(23,6) DEFAULT NULL, + `from_unixtime(1) + 0` double(23,6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; End of 4.1 tests diff --git a/sql/table.cc b/sql/table.cc index f26ba853750..c7b851949fc 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1025,28 +1025,6 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if (share->key_info[key].flags & HA_FULLTEXT) share->key_info[key].algorithm= HA_KEY_ALG_FULLTEXT; - if (primary_key >= MAX_KEY && (keyinfo->flags & HA_NOSAME)) - { - /* - If the UNIQUE key doesn't have NULL columns and is not a part key - declare this as a primary key. - */ - primary_key=key; - for (i=0 ; i < keyinfo->key_parts ;i++) - { - uint fieldnr= key_part[i].fieldnr; - if (!fieldnr || - share->field[fieldnr-1]->null_ptr || - share->field[fieldnr-1]->key_length() != - key_part[i].length) - { - primary_key=MAX_KEY; // Can't be used - break; - } - } - } - - for (i=0 ; i < keyinfo->key_parts ; key_part++,i++) { Field *field;