summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/maria.h1
-rw-r--r--mysql-test/suite/pbxt/r/select.result4
-rw-r--r--mysql-test/suite/pbxt/t/select.test1
-rw-r--r--storage/maria/ha_maria.cc2
-rw-r--r--storage/maria/ma_init.c7
5 files changed, 6 insertions, 9 deletions
diff --git a/include/maria.h b/include/maria.h
index 0e406d747be..8e5c485767a 100644
--- a/include/maria.h
+++ b/include/maria.h
@@ -283,6 +283,7 @@ extern int (*maria_test_invalid_symlink)(const char *filename);
extern int maria_init(void);
extern void maria_end(void);
+extern my_bool maria_upgrade(void);
extern int maria_close(MARIA_HA *file);
extern int maria_delete(MARIA_HA *file, const uchar *buff);
extern MARIA_HA *maria_open(const char *name, int mode,
diff --git a/mysql-test/suite/pbxt/r/select.result b/mysql-test/suite/pbxt/r/select.result
index f85e6ccab1d..ed2bc4e5e22 100644
--- a/mysql-test/suite/pbxt/r/select.result
+++ b/mysql-test/suite/pbxt/r/select.result
@@ -3453,8 +3453,8 @@ In next EXPLAIN, B.rows must be exactly 10:
explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE A range PRIMARY PRIMARY 12 NULL 1 Using where
-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 1
+1 SIMPLE A range PRIMARY PRIMARY 12 NULL # Using where
+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e #
drop table t1, t2;
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
diff --git a/mysql-test/suite/pbxt/t/select.test b/mysql-test/suite/pbxt/t/select.test
index 6b2781e6a5b..014f88b0e1b 100644
--- a/mysql-test/suite/pbxt/t/select.test
+++ b/mysql-test/suite/pbxt/t/select.test
@@ -2912,6 +2912,7 @@ insert into t2 select A.a, B.a, C.a, C.a from t1 A, t1 B, t1 C;
analyze table t2;
select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
+--replace_column 9 #
explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
drop table t1, t2;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 0061b77df50..e344d237c8e 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -3291,7 +3291,7 @@ static int ha_maria_init(void *p)
maria_hton->flags= HTON_CAN_RECREATE | HTON_SUPPORT_LOG_TABLES;
bzero(maria_log_pagecache, sizeof(*maria_log_pagecache));
maria_tmpdir= &mysql_tmpdir_list; /* For REDO */
- res= maria_init() || ma_control_file_open(TRUE, TRUE) ||
+ res= maria_upgrade() || maria_init() || ma_control_file_open(TRUE, TRUE) ||
((force_start_after_recovery_failures != 0) &&
mark_recovery_start(log_dir)) ||
!init_pagecache(maria_pagecache,
diff --git a/storage/maria/ma_init.c b/storage/maria/ma_init.c
index d0eea52e341..902f06d93e5 100644
--- a/storage/maria/ma_init.c
+++ b/storage/maria/ma_init.c
@@ -22,9 +22,6 @@
#include "ma_checkpoint.h"
#include <hash.h>
-static my_bool maria_upgrade();
-
-
void history_state_free(MARIA_STATE_HISTORY_CLOSED *closed_history)
{
MARIA_STATE_HISTORY *history, *next;
@@ -68,8 +65,6 @@ int maria_init(void)
maria_block_size % MARIA_MIN_KEY_BLOCK_LENGTH == 0);
if (!maria_inited)
{
- if (maria_upgrade())
- return 1;
maria_inited= TRUE;
pthread_mutex_init(&THR_LOCK_maria,MY_MUTEX_INIT_SLOW);
_ma_init_block_record_data();
@@ -130,7 +125,7 @@ void maria_end(void)
*/
-static my_bool maria_upgrade()
+my_bool maria_upgrade()
{
char name[FN_REFLEN], new_name[FN_REFLEN];
DBUG_ENTER("maria_upgrade");