Merge lp:~vkolesnikov/pbxt/pbxt-bug-688404 into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Work in progress
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-bug-688404
Merge into: lp:pbxt
Diff against target: 224 lines (+40/-9)
12 files modified
ChangeLog (+1/-0)
src/cache_xt.cc (+5/-0)
src/discover_xt.cc (+1/-1)
src/ha_pbxt.cc (+2/-2)
src/heap_xt.cc (+1/-0)
src/lock_xt.cc (+5/-0)
src/lock_xt.h (+1/-0)
src/memory_xt.cc (+11/-0)
src/memory_xt.h (+6/-0)
src/table_xt.cc (+6/-4)
src/xaction_xt.cc (+0/-1)
src/xt_defs.h (+1/-1)
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-bug-688404
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+64819@code.launchpad.net

Description of the change

added 16 byte aligner to memory debugging structure

To post a comment you must log in.

Unmerged revisions

869. By Vladimir Kolesnikov

fixed bug #688404: pbxt crashes on Windows 64 (misalignment on SSE instruciton)

868. By vladimir <vladimir@d17>

fixes by MariaDB team

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-04-08 15:06:35 +0000
3+++ ChangeLog 2011-06-16 13:12:35 +0000
4@@ -2,6 +2,7 @@
5 ==================
6
7 ------- 1.0.11-8 Pre-GA - Not released yet
8+RN342: Fixed bug #688404: pbxt crashes on Windows 64 (misalignment on SSE instruciton)
9
10 RN341: Fixed preload.test bug, as reported by Monty Program AB.
11
12
13=== modified file 'src/cache_xt.cc'
14--- src/cache_xt.cc 2010-08-31 10:14:41 +0000
15+++ src/cache_xt.cc 2011-06-16 13:12:35 +0000
16@@ -717,6 +717,11 @@
17 ind_handle_exit(self);
18
19 if (ind_cac_globals.cg_blocks) {
20+ XTIndBlockPtr block = ind_cac_globals.cg_blocks;
21+ for (u_int i=0; i<ind_cac_globals.cg_block_count; i++) {
22+ XT_IPAGE_FREE_LOCK(self, &block->cb_lock);
23+ block++;
24+ }
25 xt_free(self, ind_cac_globals.cg_blocks);
26 ind_cac_globals.cg_blocks = NULL;
27 xt_free_mutex(&ind_cac_globals.cg_lock);
28
29=== modified file 'src/discover_xt.cc'
30--- src/discover_xt.cc 2010-09-10 14:46:31 +0000
31+++ src/discover_xt.cc 2011-06-16 13:12:35 +0000
32@@ -1623,7 +1623,7 @@
33 #endif
34 NULL /*default_value*/, NULL /*on_update_value*/, &comment, NULL /*change*/,
35 NULL /*interval_list*/, info->field_charset, 0 /*uint_geom_type*/
36-#ifdef MARIADB_BASE_VERSION
37+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
38 , NULL /*vcol_info*/, NULL /* create options */
39 #endif
40 ))
41
42=== modified file 'src/ha_pbxt.cc'
43--- src/ha_pbxt.cc 2010-12-10 12:45:07 +0000
44+++ src/ha_pbxt.cc 2011-06-16 13:12:35 +0000
45@@ -1615,7 +1615,7 @@
46 static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err)
47 {
48 THD *thd;
49- XTThreadPtr self = NULL;
50+ XTThreadPtr volatile self = NULL;
51
52 *temp_thread = 0;
53 if ((thd = current_thd))
54@@ -6159,7 +6159,7 @@
55 drizzle_declare_plugin_end;
56 #else
57 mysql_declare_plugin_end;
58-#ifdef MARIADB_BASE_VERSION
59+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
60 maria_declare_plugin(pbxt)
61 { /* PBXT */
62 MYSQL_STORAGE_ENGINE_PLUGIN,
63
64=== modified file 'src/heap_xt.cc'
65--- src/heap_xt.cc 2009-11-10 15:17:41 +0000
66+++ src/heap_xt.cc 2011-06-16 13:12:35 +0000
67@@ -109,6 +109,7 @@
68 if (hp->h_finalize)
69 (*hp->h_finalize)(self, hp);
70 xt_spinlock_unlock(&hp->h_lock);
71+ xt_spinlock_free(NULL, &hp->h_lock);
72 xt_free(self, hp);
73 return;
74 }
75
76=== modified file 'src/lock_xt.cc'
77--- src/lock_xt.cc 2011-04-07 16:12:22 +0000
78+++ src/lock_xt.cc 2011-06-16 13:12:35 +0000
79@@ -726,11 +726,15 @@
80 rl->rl_groups[i].lg_list_in_use = 0;
81 rl->rl_groups[i].lg_list = NULL;
82 }
83+ rl->valid = 1;
84 return OK;
85 }
86
87 void xt_exit_row_locks(XTRowLocksPtr rl)
88 {
89+ if (!rl->valid)
90+ return;
91+
92 for (int i=0; i<XT_ROW_LOCK_GROUP_COUNT; i++) {
93 xt_spinlock_free(NULL, &rl->rl_groups[i].lg_lock);
94 rl->rl_groups[i].lg_wait_queue = NULL;
95@@ -741,6 +745,7 @@
96 rl->rl_groups[i].lg_list = NULL;
97 }
98 }
99+ rl->valid = 0;
100 }
101
102 /*
103
104=== modified file 'src/lock_xt.h'
105--- src/lock_xt.h 2010-05-06 12:18:50 +0000
106+++ src/lock_xt.h 2011-06-16 13:12:35 +0000
107@@ -658,6 +658,7 @@
108 struct XTLockWait;
109
110 typedef struct XTRowLocks {
111+ int valid;
112 XTLockGroupRec rl_groups[XT_ROW_LOCK_GROUP_COUNT];
113
114 void xt_cancel_temp_lock(XTLockWaitPtr lw);
115
116=== modified file 'src/memory_xt.cc'
117--- src/memory_xt.cc 2009-11-25 15:02:05 +0000
118+++ src/memory_xt.cc 2011-06-16 13:12:35 +0000
119@@ -548,8 +548,19 @@
120 #define MEM_FREED_BYTE 0x03
121
122 typedef struct MemoryDebug {
123+#ifdef _WIN64
124+ union
125+ {
126+ __m128 aligner;
127+ struct {
128+#endif
129 xtWord4 check;
130 xtWord4 size;
131+#ifdef _WIN64
132+ };
133+ };
134+#endif
135+
136 char data[200];
137 } MemoryDebugRec, *MemoryDebugPtr;
138
139
140=== modified file 'src/memory_xt.h'
141--- src/memory_xt.h 2009-05-27 14:42:16 +0000
142+++ src/memory_xt.h 2011-06-16 13:12:35 +0000
143@@ -30,6 +30,12 @@
144 struct XTThread;
145
146 #ifdef DEBUG
147+
148+// import __m128 intrinsics
149+#ifdef _WIN64
150+#include <xmmintrin.h>
151+#endif
152+
153 #define DEBUG_MEMORY
154 #endif
155
156
157=== modified file 'src/table_xt.cc'
158--- src/table_xt.cc 2010-11-10 12:03:11 +0000
159+++ src/table_xt.cc 2011-06-16 13:12:35 +0000
160@@ -728,7 +728,7 @@
161 {
162 u_int edx;
163 XTTableEntryPtr te_ptr;
164- volatile XTTableHPtr tab;
165+ volatile XTTableHPtr tab= 0;
166 char path[PATH_MAX];
167
168 enter_();
169@@ -1134,7 +1134,7 @@
170 XTOpenFilePtr of_rec, of_ind;
171 XTTableEntryPtr te_ptr;
172 size_t tab_format_offset;
173- size_t tab_head_size;
174+ size_t tab_head_size= 0;
175
176 enter_();
177
178@@ -1757,6 +1757,8 @@
179 tab_close_mapped_files(self, tab);
180
181 tab_delete_table_files(self, tab_name, tab_id);
182+ /* Remove table from "repair-pending" */
183+ xt_tab_table_repaired(tab);
184
185 ASSERT(xt_get_self() == self);
186 if ((te_ptr = (XTTableEntryPtr) xt_sl_find(self, db->db_table_by_id, &tab_id))) {
187@@ -4456,10 +4458,10 @@
188 xtXactID rec_xn_id = 0;
189 xtBool wait = FALSE;
190 xtXactID wait_xn_id = 0;
191- xtRowID row_id;
192+ xtRowID row_id= 0;
193 xtRecordID var_rec_id;
194 xtXactID xn_id;
195- register XTTableHPtr tab;
196+ register XTTableHPtr tab = 0;
197 #ifdef TRACE_VARIATIONS_IN_DUP_CHECK
198 char t_buf[500];
199 int len;
200
201=== modified file 'src/xaction_xt.cc'
202--- src/xaction_xt.cc 2010-08-31 13:58:00 +0000
203+++ src/xaction_xt.cc 2011-06-16 13:12:35 +0000
204@@ -1123,7 +1123,6 @@
205 */
206 for (u_int i=0; i<XT_XN_NO_OF_SEGMENTS; i++) {
207 seg = &db->db_xn_idx[i];
208- XT_XACT_INIT_LOCK(self, &seg->xs_tab_lock);
209 seg->xs_last_xn_id = db->db_xn_curr_id;
210 }
211
212
213=== modified file 'src/xt_defs.h'
214--- src/xt_defs.h 2010-09-10 14:46:31 +0000
215+++ src/xt_defs.h 2011-06-16 13:12:35 +0000
216@@ -891,7 +891,7 @@
217 #define MX_ULONGLONG_T ulonglong
218 #define MX_LONGLONG_T longlong
219 #define MX_CHARSET_INFO CHARSET_INFO
220-#ifdef MARIADB_BASE_VERSION
221+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
222 #define MX_CONST_CHARSET_INFO const struct charset_info_st
223 #else
224 #define MX_CONST_CHARSET_INFO struct charset_info_st

Subscribers

People subscribed via source and target branches