Merge lp:~vkolesnikov/pbxt/pbxt-maria-windows-app-ver-fixes into lp:pbxt

Proposed by Vladimir Kolesnikov on 2011-06-15
Status: Work in progress
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-maria-windows-app-ver-fixes
Merge into: lp:pbxt
Diff against target: 171 lines (+22/-9) 9 files modified
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-maria-windows-app-ver-fixes
Reviewer Review Type Date Requested Status
PBXT Core 2011-06-15 Pending
Review via email: mp+64683@code.launchpad.net

Description of the Change

Hi Paul,

these fixes were done by Vladislav Vaintroub of MariaDB team in the MariaDB branch of PBXT. I merged them back and tested on both Linux and Windows against MariaDB and MySQL 5.1.

To post a comment you must log in.

Unmerged revisions

868. By vladimir <vladimir@d17> on 2011-06-15

fixes by MariaDB team

Preview Diff

1=== modified file 'src/cache_xt.cc'
2--- src/cache_xt.cc 2010-08-31 10:14:41 +0000
3+++ src/cache_xt.cc 2011-06-15 13:25:27 +0000
4@@ -717,6 +717,11 @@
5 ind_handle_exit(self);
6
7 if (ind_cac_globals.cg_blocks) {
8+ XTIndBlockPtr block = ind_cac_globals.cg_blocks;
9+ for (u_int i=0; i<ind_cac_globals.cg_block_count; i++) {
10+ XT_IPAGE_FREE_LOCK(self, &block->cb_lock);
11+ block++;
12+ }
13 xt_free(self, ind_cac_globals.cg_blocks);
14 ind_cac_globals.cg_blocks = NULL;
15 xt_free_mutex(&ind_cac_globals.cg_lock);
16
17=== modified file 'src/discover_xt.cc'
18--- src/discover_xt.cc 2010-09-10 14:46:31 +0000
19+++ src/discover_xt.cc 2011-06-15 13:25:27 +0000
20@@ -1623,7 +1623,7 @@
21 #endif
22 NULL /*default_value*/, NULL /*on_update_value*/, &comment, NULL /*change*/,
23 NULL /*interval_list*/, info->field_charset, 0 /*uint_geom_type*/
24-#ifdef MARIADB_BASE_VERSION
25+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
26 , NULL /*vcol_info*/, NULL /* create options */
27 #endif
28 ))
29
30=== modified file 'src/ha_pbxt.cc'
31--- src/ha_pbxt.cc 2010-12-10 12:45:07 +0000
32+++ src/ha_pbxt.cc 2011-06-15 13:25:27 +0000
33@@ -1615,7 +1615,7 @@
34 static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err)
35 {
36 THD *thd;
37- XTThreadPtr self = NULL;
38+ XTThreadPtr volatile self = NULL;
39
40 *temp_thread = 0;
41 if ((thd = current_thd))
42@@ -6159,7 +6159,7 @@
43 drizzle_declare_plugin_end;
44 #else
45 mysql_declare_plugin_end;
46-#ifdef MARIADB_BASE_VERSION
47+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
48 maria_declare_plugin(pbxt)
49 { /* PBXT */
50 MYSQL_STORAGE_ENGINE_PLUGIN,
51
52=== modified file 'src/heap_xt.cc'
53--- src/heap_xt.cc 2009-11-10 15:17:41 +0000
54+++ src/heap_xt.cc 2011-06-15 13:25:27 +0000
55@@ -109,6 +109,7 @@
56 if (hp->h_finalize)
57 (*hp->h_finalize)(self, hp);
58 xt_spinlock_unlock(&hp->h_lock);
59+ xt_spinlock_free(NULL, &hp->h_lock);
60 xt_free(self, hp);
61 return;
62 }
63
64=== modified file 'src/lock_xt.cc'
65--- src/lock_xt.cc 2011-04-07 16:12:22 +0000
66+++ src/lock_xt.cc 2011-06-15 13:25:27 +0000
67@@ -726,11 +726,15 @@
68 rl->rl_groups[i].lg_list_in_use = 0;
69 rl->rl_groups[i].lg_list = NULL;
70 }
71+ rl->valid = 1;
72 return OK;
73 }
74
75 void xt_exit_row_locks(XTRowLocksPtr rl)
76 {
77+ if (!rl->valid)
78+ return;
79+
80 for (int i=0; i<XT_ROW_LOCK_GROUP_COUNT; i++) {
81 xt_spinlock_free(NULL, &rl->rl_groups[i].lg_lock);
82 rl->rl_groups[i].lg_wait_queue = NULL;
83@@ -741,6 +745,7 @@
84 rl->rl_groups[i].lg_list = NULL;
85 }
86 }
87+ rl->valid = 0;
88 }
89
90 /*
91
92=== modified file 'src/lock_xt.h'
93--- src/lock_xt.h 2010-05-06 12:18:50 +0000
94+++ src/lock_xt.h 2011-06-15 13:25:27 +0000
95@@ -658,6 +658,7 @@
96 struct XTLockWait;
97
98 typedef struct XTRowLocks {
99+ int valid;
100 XTLockGroupRec rl_groups[XT_ROW_LOCK_GROUP_COUNT];
101
102 void xt_cancel_temp_lock(XTLockWaitPtr lw);
103
104=== modified file 'src/table_xt.cc'
105--- src/table_xt.cc 2010-11-10 12:03:11 +0000
106+++ src/table_xt.cc 2011-06-15 13:25:27 +0000
107@@ -728,7 +728,7 @@
108 {
109 u_int edx;
110 XTTableEntryPtr te_ptr;
111- volatile XTTableHPtr tab;
112+ volatile XTTableHPtr tab= 0;
113 char path[PATH_MAX];
114
115 enter_();
116@@ -1134,7 +1134,7 @@
117 XTOpenFilePtr of_rec, of_ind;
118 XTTableEntryPtr te_ptr;
119 size_t tab_format_offset;
120- size_t tab_head_size;
121+ size_t tab_head_size= 0;
122
123 enter_();
124
125@@ -1757,6 +1757,8 @@
126 tab_close_mapped_files(self, tab);
127
128 tab_delete_table_files(self, tab_name, tab_id);
129+ /* Remove table from "repair-pending" */
130+ xt_tab_table_repaired(tab);
131
132 ASSERT(xt_get_self() == self);
133 if ((te_ptr = (XTTableEntryPtr) xt_sl_find(self, db->db_table_by_id, &tab_id))) {
134@@ -4456,10 +4458,10 @@
135 xtXactID rec_xn_id = 0;
136 xtBool wait = FALSE;
137 xtXactID wait_xn_id = 0;
138- xtRowID row_id;
139+ xtRowID row_id= 0;
140 xtRecordID var_rec_id;
141 xtXactID xn_id;
142- register XTTableHPtr tab;
143+ register XTTableHPtr tab = 0;
144 #ifdef TRACE_VARIATIONS_IN_DUP_CHECK
145 char t_buf[500];
146 int len;
147
148=== modified file 'src/xaction_xt.cc'
149--- src/xaction_xt.cc 2010-08-31 13:58:00 +0000
150+++ src/xaction_xt.cc 2011-06-15 13:25:27 +0000
151@@ -1123,7 +1123,6 @@
152 */
153 for (u_int i=0; i<XT_XN_NO_OF_SEGMENTS; i++) {
154 seg = &db->db_xn_idx[i];
155- XT_XACT_INIT_LOCK(self, &seg->xs_tab_lock);
156 seg->xs_last_xn_id = db->db_xn_curr_id;
157 }
158
159
160=== modified file 'src/xt_defs.h'
161--- src/xt_defs.h 2010-09-10 14:46:31 +0000
162+++ src/xt_defs.h 2011-06-15 13:25:27 +0000
163@@ -891,7 +891,7 @@
164 #define MX_ULONGLONG_T ulonglong
165 #define MX_LONGLONG_T longlong
166 #define MX_CHARSET_INFO CHARSET_INFO
167-#ifdef MARIADB_BASE_VERSION
168+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 50200
169 #define MX_CONST_CHARSET_INFO const struct charset_info_st
170 #else
171 #define MX_CONST_CHARSET_INFO struct charset_info_st

Subscribers

People subscribed via source and target branches