From 9a94d6d72926256c9bba185dba1ca124fa43933e Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Mon, 16 Jun 2003 13:18:57 +0200 Subject: [PATCH 1/5] comment added --- mysys/tree.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mysys/tree.c b/mysys/tree.c index a3b69ebff5e..91d2f9771b5 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -46,6 +46,16 @@ Implemented by monty. */ +/* + NOTE: + tree->compare function should be ALWAYS called as + (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key) + and not other way around, as + (*tree->compare)(custom_arg, key, ELEMENT_KEY(tree,element)) + + ft_boolean_search.c (at least) relies on that. +*/ + #include "mysys_priv.h" #include #include From f6b0f559c3ccf283dfc001514356d5cc3095aac3 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Thu, 26 Jun 2003 13:23:08 +0200 Subject: [PATCH 2/5] preload.test: Change mode to -rw-rw-r-- --- mysql-test/t/preload.test | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 mysql-test/t/preload.test diff --git a/mysql-test/t/preload.test b/mysql-test/t/preload.test old mode 100755 new mode 100644 From 32ea8fea28573281cb67b38a8ab09b3944001ebb Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 27 Jun 2003 19:32:59 +0200 Subject: [PATCH 3/5] fix test when no InnoDB is present --- mysql-test/t/func_group.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 1bf924100a9..fed19cbe07c 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -348,7 +348,9 @@ insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; drop table t1; +--disable_warnings create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) type=InnoDB; +--enable_warnings insert into t1 values (1, 3); select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ; select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ; From 55115e0f9db0fe7aacf89b0f04e595ec5b0ee968 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sat, 28 Jun 2003 23:01:33 +0200 Subject: [PATCH 4/5] timestamp MYD-4.0 format compatibility fix --- sql/field.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/field.cc b/sql/field.cc index 394078b7aab..4aa58180a69 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2672,6 +2672,7 @@ Field_timestamp::Field_timestamp(char *ptr_arg, uint32 len_arg, :Field_str(ptr_arg, 19, (uchar*) 0,0, unireg_check_arg, field_name_arg, table_arg, cs) { + flags|=ZEROFILL_FLAG; /* 4.0 MYD compatibility */ if (table && !table->timestamp_field) { table->timestamp_field= this; // Automatic timestamp From d5fbeee71fe8e757754c3b3edc5e1e01d1f67088 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Sat, 28 Jun 2003 23:54:33 +0200 Subject: [PATCH 5/5] fixed a bug that made 4.0 MYI+FT files unreadable in 4.1 --- myisam/mi_open.c | 1 - myisam/myisamchk.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 178365577aa..5d8f384a5af 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -335,7 +335,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) { /* 4.0 compatibility code, to be removed in 5.0 */ share->keyinfo[i].seg=pos-FT_SEGS; share->keyinfo[i].keysegs-=FT_SEGS; - share->state.header.fulltext_keys++; } else { diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index 72b2567278e..b7f8d561a5b 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -876,7 +876,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) } else { - if (share->state.header.fulltext_keys && !stopwords_inited++) + if (!stopwords_inited++) ft_init_stopwords(); if (!(param->testflag & T_READONLY))