Merge lp:~vlad-lesin/percona-server/5.5-bug-1038940-table_cache_speed_up into lp:percona-server/5.5

Proposed by Vlad Lesin
Status: Work in progress
Proposed branch: lp:~vlad-lesin/percona-server/5.5-bug-1038940-table_cache_speed_up
Merge into: lp:percona-server/5.5
Diff against target: 320 lines (+116/-34)
10 files modified
Percona-Server/storage/myisam/ha_myisam.cc (+3/-0)
Percona-Server/storage/myisam/mi_close.c (+1/-1)
Percona-Server/storage/myisam/mi_dbug.c (+3/-3)
Percona-Server/storage/myisam/mi_keycache.c (+3/-3)
Percona-Server/storage/myisam/mi_open.c (+67/-13)
Percona-Server/storage/myisam/mi_panic.c (+24/-8)
Percona-Server/storage/myisam/mi_static.c (+1/-1)
Percona-Server/storage/myisam/myisamchk.c (+6/-0)
Percona-Server/storage/myisam/myisamdef.h (+3/-3)
Percona-Server/storage/myisam/myisampack.c (+5/-2)
To merge this branch: bzr merge lp:~vlad-lesin/percona-server/5.5-bug-1038940-table_cache_speed_up
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Needs Fixing
Stewart Smith Pending
Review via email: mp+141748@code.launchpad.net

Description of the change

This MP is port of this http://lists.mysql.com/commits/121507 patch to 5.5(see issue #25137). The main idea of this patch is to replace linked list of opened tables with hash-table to improve performance of open table lookup mechanism.

Jenkins test:
http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/610

To post a comment you must log in.
387. By Stewart Smith

Merge lp:~lp-dev-merge-bot/percona-server/staging-5.1 containing lp:~vlad-lesin/percona-server/5.1-bug1049871-injections-gca to 5.5 - one small conflict

388. By Stewart Smith

reverse the bad merge from previous revision (r387 - Merge lp:~lp-dev-merge-bot/percona-server/staging-5.1 containing lp:~vlad-lesin/percona-server/5.1-bug1049871-injections-gca to 5.5 - one small conflict
modified). This merge was incorrect and caused rpl.rpl_mdev382 to fail

389. By <email address hidden>

Merge lp:~hrvojem/percona-server/bug1070930-5.5

390. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1087202-10872128-5.5-2

391. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.5.28-29.3

392. By <email address hidden>

Empty merge from Percona Server 5.1

393. By <email address hidden>

Merge lp:~percona-core/percona-server/release-5.5.28-29.3

394. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.5.28-29.3-r2

395. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.1.66-14.2-r2-5.5

396. By <email address hidden>

Empty merge from Percona Server 5.1

397. By <email address hidden>

Merge lp:~stewart/percona-server/5.5.29

398. By <email address hidden>

Merge lp:~hrvojem/percona-server/bug1092106-5.5

399. By <email address hidden>

Empty merge from Percona Server 5.1

400. By <email address hidden>

Merge lp:~stewart/percona-server/5.5-5.1.66-14.1-merge

401. By <email address hidden>

Empty merge from Percona Server 5.1

402. By Stewart Smith

merge 5.1.66-14.2 release branch

403. By <email address hidden>

Merge lp:~hrvojem/percona-server/rn-5.1.67-14.3-5.5

404. By <email address hidden>

Empty merge from Percona Server 5.1

405. By <email address hidden>

Merge lp:~sergei.glushchenko/percona-server/ST-27220-bug1042946

406. By <email address hidden>

Empty merge from Percona Server 5.1

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

At line 193, "if (my_hash_inited(...))" should be !my_hash_inited instead I think.

Also, please make a 5.6 MP (without a bzr merge).

review: Needs Fixing
407. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1100159-5.5

408. By <email address hidden>

Merge lp:~sergei.glushchenko/percona-server/ps55-bug1017192

409. By <email address hidden>

Empty merge from Percona Server 5.1

410. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16724-xtradb-bmp-requests-5.5

411. By <email address hidden>

Empty merge from Percona Server 5.1

412. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1082437-5.5

413. By <email address hidden>

Empty merge from Percona Server 5.1

414. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1083596-5.5

415. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1083669-5.5

416. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1083058-5.5

417. By <email address hidden>

Empty merge from Percona Server 5.1

418. By <email address hidden>

Merge lp:~stewart/percona-server/5.5-bug986247-remove-optimizer-fix

419. By <email address hidden>

Merge lp:~abychko/percona-server/bug1099809

420. By <email address hidden>

Merge lp:~hrvojem/percona-server/bug1065771-5.5

421. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1100178-1100643-5.5

422. By <email address hidden>

Empty merge from Percona Server 5.1

423. By <email address hidden>

Merge lp:~abychko/percona-server/bug1103328

424. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1105709-5.5

425. By <email address hidden>

Merge lp:~hrvojem/percona-server/ps-25

426. By <email address hidden>

Merge lp:~abychko/percona-server/bug881944

427. By <email address hidden>

Empty merge from Percona Server 5.1

428. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bpage-io-fix

429. By <email address hidden>

Empty merge from Percona Server 5.1

430. By <email address hidden>

Empty merge from Percona Server 5.1

431. By <email address hidden>

Empty merge from Percona Server 5.1

432. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1101030

433. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1111226-5.5

434. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1114612-5.5

435. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1108874-5.5

436. By <email address hidden>

Empty merge from Percona Server 5.1

437. By <email address hidden>

Empty merge from Percona Server 5.1

438. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/slow-log-fixes-5.5

439. By Stewart Smith

null merge 5.1 implementation of slow query log fixes, as 5.5 is sep impl

440. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/BT-16274-bug1105726-5.5

441. By <email address hidden>

Merge lp:~hrvojem/percona-server/bug1092189-5.5

442. By <email address hidden>

Empty merge from Percona Server 5.1

443. By <email address hidden>

Empty merge from Percona Server 5.1

444. By <email address hidden>

Empty merge from Percona Server 5.1

445. By <email address hidden>

Merge lp:~sergei.glushchenko/percona-server/55-tp

446. By Alexey Kopytov

Bug #1126077: Remove clang warnings

Fixed an annoying warning in the InnoDB code produced by clang.

This is a backport from 5.6.

447. By <email address hidden>

Merge lp:~gl-az/percona-server/BT-26980-5.5-bug1068210

448. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1089265-5.5

449. By <email address hidden>

Merge lp:~akopytov/percona-server/bug1125259

450. By <email address hidden>

Merge lp:~laurynas-biveinis/percona-server/bug1117067-5.5

451. By Vlad Lesin

As the number of open tables is increased, table lookup
(testing if a table is already open) and (in particular)
the case when a table is not open, became increasingly more
expensive.

The problem was caused by the open table lookup mechanism,
which was based on traversing a linked list comparing the
file names.

As the list was replaced by a hash table, the lookup
time dropped significantly when used on systems with
a large number of open tables.

The original patch can be found here:
http://lists.mysql.com/commits/121507

Revision history for this message
Vlad Lesin (vlad-lesin) wrote :

> At line 193, "if (my_hash_inited(...))" should be !my_hash_inited instead I
> think.

Fixed. As well unnecessary changes from mi_panic.c are removed. Currently 5.1, 5.5 and 5.6 patches are almost the same.

> Also, please make a 5.6 MP (without a bzr merge).
Done. See bug related branches.

Jenkins: http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/692/

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The patch is OK, but I'll have to ask you to redo it as a GCA involving all three 5.1/5.5/5.6.

review: Needs Fixing

Unmerged revisions

451. By Vlad Lesin

As the number of open tables is increased, table lookup
(testing if a table is already open) and (in particular)
the case when a table is not open, became increasingly more
expensive.

The problem was caused by the open table lookup mechanism,
which was based on traversing a linked list comparing the
file names.

As the list was replaced by a hash table, the lookup
time dropped significantly when used on systems with
a large number of open tables.

The original patch can be found here:
http://lists.mysql.com/commits/121507

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/storage/myisam/ha_myisam.cc'
--- Percona-Server/storage/myisam/ha_myisam.cc 2012-10-17 03:47:45 +0000
+++ Percona-Server/storage/myisam/ha_myisam.cc 2013-02-24 23:11:32 +0000
@@ -2191,6 +2191,9 @@
2191 myisam_hton->flags= HTON_CAN_RECREATE | HTON_SUPPORT_LOG_TABLES;2191 myisam_hton->flags= HTON_CAN_RECREATE | HTON_SUPPORT_LOG_TABLES;
2192 myisam_hton->is_supported_system_table= myisam_is_supported_system_table;2192 myisam_hton->is_supported_system_table= myisam_is_supported_system_table;
21932193
2194 if (mi_init_open_table_hash(table_cache_size))
2195 return 1;
2196
2194 return 0;2197 return 0;
2195}2198}
21962199
21972200
=== modified file 'Percona-Server/storage/myisam/mi_close.c'
--- Percona-Server/storage/myisam/mi_close.c 2012-02-16 09:48:16 +0000
+++ Percona-Server/storage/myisam/mi_close.c 2013-02-24 23:11:32 +0000
@@ -54,7 +54,7 @@
54 info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);54 info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
55 }55 }
56 flag= !--share->reopen;56 flag= !--share->reopen;
57 myisam_open_list=list_delete(myisam_open_list,&info->open_list);57 my_hash_delete(&myisam_open_table_hash, (uchar *) info);
58 mysql_mutex_unlock(&share->intern_lock);58 mysql_mutex_unlock(&share->intern_lock);
5959
60 my_free(mi_get_rec_buff_ptr(info, info->rec_buff));60 my_free(mi_get_rec_buff_ptr(info, info->rec_buff));
6161
=== modified file 'Percona-Server/storage/myisam/mi_dbug.c'
--- Percona-Server/storage/myisam/mi_dbug.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/storage/myisam/mi_dbug.c 2013-02-24 23:11:32 +0000
@@ -181,14 +181,14 @@
181my_bool check_table_is_closed(const char *name, const char *where)181my_bool check_table_is_closed(const char *name, const char *where)
182{182{
183 char filename[FN_REFLEN];183 char filename[FN_REFLEN];
184 LIST *pos;184 uint idx;
185 DBUG_ENTER("check_table_is_closed");185 DBUG_ENTER("check_table_is_closed");
186186
187 (void) fn_format(filename,name,"",MI_NAME_IEXT,4+16+32);187 (void) fn_format(filename,name,"",MI_NAME_IEXT,4+16+32);
188 mysql_mutex_lock(&THR_LOCK_myisam);188 mysql_mutex_lock(&THR_LOCK_myisam);
189 for (pos=myisam_open_list ; pos ; pos=pos->next)189 for (idx= 0; idx < myisam_open_table_hash.records; ++idx)
190 {190 {
191 MI_INFO *info=(MI_INFO*) pos->data;191 MI_INFO *info=(MI_INFO*) my_hash_element(&myisam_open_table_hash, idx);
192 MYISAM_SHARE *share=info->s;192 MYISAM_SHARE *share=info->s;
193 if (!strcmp(share->unique_file_name,filename))193 if (!strcmp(share->unique_file_name,filename))
194 {194 {
195195
=== modified file 'Percona-Server/storage/myisam/mi_keycache.c'
--- Percona-Server/storage/myisam/mi_keycache.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/storage/myisam/mi_keycache.c 2013-02-24 23:11:32 +0000
@@ -138,16 +138,16 @@
138void mi_change_key_cache(KEY_CACHE *old_key_cache,138void mi_change_key_cache(KEY_CACHE *old_key_cache,
139 KEY_CACHE *new_key_cache)139 KEY_CACHE *new_key_cache)
140{140{
141 LIST *pos;141 uint idx;
142 DBUG_ENTER("mi_change_key_cache");142 DBUG_ENTER("mi_change_key_cache");
143143
144 /*144 /*
145 Lock list to ensure that no one can close the table while we manipulate it145 Lock list to ensure that no one can close the table while we manipulate it
146 */146 */
147 mysql_mutex_lock(&THR_LOCK_myisam);147 mysql_mutex_lock(&THR_LOCK_myisam);
148 for (pos=myisam_open_list ; pos ; pos=pos->next)148 for (idx= 0; idx < myisam_open_table_hash.records; ++idx)
149 {149 {
150 MI_INFO *info= (MI_INFO*) pos->data;150 MI_INFO *info=(MI_INFO*) my_hash_element(&myisam_open_table_hash, idx);
151 MYISAM_SHARE *share= info->s;151 MYISAM_SHARE *share= info->s;
152 if (share->key_cache == old_key_cache)152 if (share->key_cache == old_key_cache)
153 mi_assign_to_key_cache(info, (ulonglong) ~0, new_key_cache);153 mi_assign_to_key_cache(info, (ulonglong) ~0, new_key_cache);
154154
=== modified file 'Percona-Server/storage/myisam/mi_open.c'
--- Percona-Server/storage/myisam/mi_open.c 2012-10-31 13:02:53 +0000
+++ Percona-Server/storage/myisam/mi_open.c 2013-02-24 23:11:32 +0000
@@ -37,23 +37,76 @@
37}37}
3838
3939
40/******************************************************************************40/*
41** Return the shared struct if the table is already open.41 Get the value used as hash key (helper function for the
42** In MySQL the server will handle version issues.42 open table hash). Function is used as a callback
43******************************************************************************/43 from the hash table
4444*/
45static uchar *mi_open_table_hash_key(const uchar *record, size_t *length,
46 my_bool not_used __attribute__((unused)))
47{
48 MI_INFO *info= (MI_INFO *) record;
49 *length= info->s->unique_name_length;
50 return (uchar*) info->s->unique_file_name;
51}
52
53/**
54 Initialize open table hash
55
56 Function is normally called from myisam_init
57 with the system variable table_cache_size used
58 as hash_size.
59
60 @param[in] hash_size Initial has size (elements)
61 @return inidicates success or failure of initialization
62 @retval 0 success
63 @retval 1 failure
64
65*/
66int mi_init_open_table_hash(ulong hash_size)
67{
68 if (hash_size == 0)
69 hash_size= 32; /* default hash size */
70
71 if (my_hash_init(&myisam_open_table_hash, &my_charset_filename,
72 hash_size, 0, 0, mi_open_table_hash_key, 0, 0))
73 return 1; /* error */
74
75 return 0;
76}
77
78
79/**
80 Retrieve the shared struct if the table is already
81 open (i.e in the open table hash)
82
83 @param[in] filename table file name
84 @return shared struct, 0 if not in the cache
85*/
45MI_INFO *test_if_reopen(char *filename)86MI_INFO *test_if_reopen(char *filename)
46{87{
47 LIST *pos;88 HASH_SEARCH_STATE current_record;
89 int len= strlen(filename);
4890
49 for (pos=myisam_open_list ; pos ; pos=pos->next)91 MI_INFO *info= (MI_INFO*) my_hash_first(&myisam_open_table_hash,
92 (uchar *) filename,
93 len, &current_record);
94 /*
95 There might be more than one instance of a table share for
96 a given table in the hash table. We're interested in the one with
97 last_version set, so we iterate until we find it
98 */
99 while (info)
50 {100 {
51 MI_INFO *info=(MI_INFO*) pos->data;
52 MYISAM_SHARE *share=info->s;101 MYISAM_SHARE *share=info->s;
53 if (!strcmp(share->unique_file_name,filename) && share->last_version)102 if (share->last_version)
54 return info;103 break;
104
105 info= (MI_INFO*) my_hash_next(&myisam_open_table_hash,
106 (uchar *) filename,
107 len, &current_record);
55 }108 }
56 return 0;109 return info;
57}110}
58111
59112
@@ -623,8 +676,9 @@
623676
624 *m_info=info;677 *m_info=info;
625 thr_lock_data_init(&share->lock,&m_info->lock,(void*) m_info);678 thr_lock_data_init(&share->lock,&m_info->lock,(void*) m_info);
626 m_info->open_list.data=(void*) m_info;679
627 myisam_open_list=list_add(myisam_open_list,&m_info->open_list);680 if (my_hash_insert(&myisam_open_table_hash, (uchar *) m_info))
681 goto err;
628682
629 mysql_mutex_unlock(&THR_LOCK_myisam);683 mysql_mutex_unlock(&THR_LOCK_myisam);
630684
631685
=== modified file 'Percona-Server/storage/myisam/mi_panic.c'
--- Percona-Server/storage/myisam/mi_panic.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/storage/myisam/mi_panic.c 2013-02-24 23:11:32 +0000
@@ -27,22 +27,36 @@
27int mi_panic(enum ha_panic_function flag)27int mi_panic(enum ha_panic_function flag)
28{28{
29 int error=0;29 int error=0;
30 LIST *list_element,*next_open;
31 MI_INFO *info;30 MI_INFO *info;
31 uint idx;
32 DBUG_ENTER("mi_panic");32 DBUG_ENTER("mi_panic");
3333
34 mysql_mutex_lock(&THR_LOCK_myisam);34 mysql_mutex_lock(&THR_LOCK_myisam);
35 for (list_element=myisam_open_list ; list_element ; list_element=next_open)35
36 if (!my_hash_inited(&myisam_open_table_hash))
37 goto finish;
38
39 if (flag == HA_PANIC_CLOSE)
36 {40 {
37 next_open=list_element->next; /* Save if close */41 while (myisam_open_table_hash.records)
38 info=(MI_INFO*) list_element->data;42 {
39 switch (flag) {43 /*
40 case HA_PANIC_CLOSE:44 As long as there are records in the hash, fetch the
45 first, and close it.
46 */
47 info=(MI_INFO*) my_hash_element(&myisam_open_table_hash, 0);
41 mysql_mutex_unlock(&THR_LOCK_myisam); /* Not exactly right... */48 mysql_mutex_unlock(&THR_LOCK_myisam); /* Not exactly right... */
42 if (mi_close(info))49 if (mi_close(info))
43 error=my_errno;50 error= my_errno;
44 mysql_mutex_lock(&THR_LOCK_myisam);51 mysql_mutex_lock(&THR_LOCK_myisam);
45 break;52 }
53 }
54
55 for (idx= 0; idx < myisam_open_table_hash.records; ++idx)
56 {
57 info=(MI_INFO*) my_hash_element(&myisam_open_table_hash, idx);
58 switch (flag) {
59 case HA_PANIC_CLOSE: break;
46 case HA_PANIC_WRITE: /* Do this to free databases */60 case HA_PANIC_WRITE: /* Do this to free databases */
47#ifdef CANT_OPEN_FILES_TWICE61#ifdef CANT_OPEN_FILES_TWICE
48 if (info->s->options & HA_OPTION_READ_ONLY_DATA)62 if (info->s->options & HA_OPTION_READ_ONLY_DATA)
@@ -111,6 +125,8 @@
111 (void) mi_log(0); /* Close log if neaded */125 (void) mi_log(0); /* Close log if neaded */
112 ft_free_stopwords();126 ft_free_stopwords();
113 }127 }
128
129finish:
114 mysql_mutex_unlock(&THR_LOCK_myisam);130 mysql_mutex_unlock(&THR_LOCK_myisam);
115 if (!error)131 if (!error)
116 DBUG_RETURN(0);132 DBUG_RETURN(0);
117133
=== modified file 'Percona-Server/storage/myisam/mi_static.c'
--- Percona-Server/storage/myisam/mi_static.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/storage/myisam/mi_static.c 2013-02-24 23:11:32 +0000
@@ -22,7 +22,7 @@
22#include "myisamdef.h"22#include "myisamdef.h"
23#endif23#endif
2424
25LIST *myisam_open_list=0;25HASH myisam_open_table_hash;
26uchar myisam_file_magic[]=26uchar myisam_file_magic[]=
27{ (uchar) 254, (uchar) 254,'\007', '\001', };27{ (uchar) 254, (uchar) 254,'\007', '\001', };
28uchar myisam_pack_file_magic[]=28uchar myisam_pack_file_magic[]=
2929
=== modified file 'Percona-Server/storage/myisam/myisamchk.c'
--- Percona-Server/storage/myisam/myisamchk.c 2012-10-30 14:10:42 +0000
+++ Percona-Server/storage/myisam/myisamchk.c 2013-02-24 23:11:32 +0000
@@ -88,6 +88,12 @@
88 get_options(&argc,(char***) &argv);88 get_options(&argc,(char***) &argv);
89 myisam_quick_table_bits=decode_bits;89 myisam_quick_table_bits=decode_bits;
90 error=0;90 error=0;
91 if (mi_init_open_table_hash(0))
92 {
93 fprintf(stderr, "Can't initialize MyISAM storage engine\n");
94 exit(-1);
95 }
96
91 while (--argc >= 0)97 while (--argc >= 0)
92 {98 {
93 int new_error=myisamchk(&check_param, *(argv++));99 int new_error=myisamchk(&check_param, *(argv++));
94100
=== modified file 'Percona-Server/storage/myisam/myisamdef.h'
--- Percona-Server/storage/myisam/myisamdef.h 2012-05-10 07:49:14 +0000
+++ Percona-Server/storage/myisam/myisamdef.h 2013-02-24 23:11:32 +0000
@@ -22,6 +22,7 @@
22#include <my_pthread.h>22#include <my_pthread.h>
23#include <thr_lock.h>23#include <thr_lock.h>
24#include <mysql/psi/mysql_file.h>24#include <mysql/psi/mysql_file.h>
25#include "hash.h"
2526
26/* undef map from my_nosys; We need test-if-disk full */27/* undef map from my_nosys; We need test-if-disk full */
27#if defined(my_write)28#if defined(my_write)
@@ -281,7 +282,6 @@
281 uint data_changed; /* Somebody has changed data */282 uint data_changed; /* Somebody has changed data */
282 uint save_update; /* When using KEY_READ */283 uint save_update; /* When using KEY_READ */
283 int save_lastinx;284 int save_lastinx;
284 LIST open_list;
285 IO_CACHE rec_cache; /* When cacheing records */285 IO_CACHE rec_cache; /* When cacheing records */
286 uint preload_buff_size; /* When preloading indexes */286 uint preload_buff_size; /* When preloading indexes */
287 myf lock_wait; /* is 0 or MY_DONT_WAIT */287 myf lock_wait; /* is 0 or MY_DONT_WAIT */
@@ -465,8 +465,7 @@
465#endif465#endif
466466
467 /* Some extern variables */467 /* Some extern variables */
468468extern HASH myisam_open_table_hash;
469extern LIST *myisam_open_list;
470extern uchar myisam_file_magic[], myisam_pack_file_magic[];469extern uchar myisam_file_magic[], myisam_pack_file_magic[];
471extern uint myisam_read_vec[], myisam_readnext_vec[];470extern uint myisam_read_vec[], myisam_readnext_vec[];
472extern uint myisam_quick_table_bits;471extern uint myisam_quick_table_bits;
@@ -748,6 +747,7 @@
748void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);747void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
749748
750extern MI_INFO *test_if_reopen(char *filename);749extern MI_INFO *test_if_reopen(char *filename);
750extern int mi_init_open_table_hash(ulong size);
751my_bool check_table_is_closed(const char *name, const char *where);751my_bool check_table_is_closed(const char *name, const char *where);
752int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *orn_name,752int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share, const char *orn_name,
753 File file_to_dup);753 File file_to_dup);
754754
=== modified file 'Percona-Server/storage/myisam/myisampack.c'
--- Percona-Server/storage/myisam/myisampack.c 2011-06-30 15:46:53 +0000
+++ Percona-Server/storage/myisam/myisampack.c 2013-02-24 23:11:32 +0000
@@ -207,9 +207,12 @@
207 char **default_argv;207 char **default_argv;
208 MY_INIT(argv[0]);208 MY_INIT(argv[0]);
209209
210 if (load_defaults("my",load_default_groups,&argc,&argv))210 if (load_defaults("my",load_default_groups,&argc,&argv) ||
211 mi_init_open_table_hash(0))
212 {
213 fputs("Can't initialize MyISAM storage engine", stderr);
211 exit(1);214 exit(1);
212215 }
213 default_argv= argv;216 default_argv= argv;
214 get_options(&argc,&argv);217 get_options(&argc,&argv);
215218

Subscribers

People subscribed via source and target branches