Merge lp:~paul-mccullagh/drizzle/bug-fix-618758 into lp:~drizzle-trunk/drizzle/development

Proposed by Paul McCullagh
Status: Merged
Approved by: Monty Taylor
Approved revision: 1731
Merged at revision: 1733
Proposed branch: lp:~paul-mccullagh/drizzle/bug-fix-618758
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 41 lines (+6/-3)
3 files modified
plugin/pbxt/src/memory_xt.cc (+1/-1)
plugin/pbxt/src/myxt_xt.cc (+4/-1)
plugin/pbxt/src/xt_defs.h (+1/-1)
To merge this branch: bzr merge lp:~paul-mccullagh/drizzle/bug-fix-618758
Reviewer Review Type Date Requested Status
Monty Taylor Approve
Review via email: mp+33798@code.launchpad.net

Description of the change

I minor change to fix a bug that caused a crash when creating a PBXT table.

To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Thanks Paul

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/pbxt/src/memory_xt.cc'
2--- plugin/pbxt/src/memory_xt.cc 2010-04-08 16:11:29 +0000
3+++ plugin/pbxt/src/memory_xt.cc 2010-08-26 16:06:42 +0000
4@@ -34,7 +34,7 @@
5 #include "trace_xt.h"
6
7 #ifdef DEBUG
8-#define RECORD_MM
9+//#define RECORD_MM
10 #endif
11
12 #ifdef DEBUG
13
14=== modified file 'plugin/pbxt/src/myxt_xt.cc'
15--- plugin/pbxt/src/myxt_xt.cc 2010-07-30 20:31:19 +0000
16+++ plugin/pbxt/src/myxt_xt.cc 2010-08-26 16:06:42 +0000
17@@ -3237,7 +3237,10 @@
18
19 xtPublic void myxt_static_convert_file_name(char *from, char *to, size_t to_len)
20 {
21- TableIdentifier::filename_to_tablename(from, to, to_len);
22+ uint32_t len = TableIdentifier::filename_to_tablename(from, to, to_len);
23+ if (len >= to_len)
24+ len = to_len-1;
25+ to[len] = 0;
26 }
27
28 xtPublic int myxt_strcasecmp(char * a, char *b)
29
30=== modified file 'plugin/pbxt/src/xt_defs.h'
31--- plugin/pbxt/src/xt_defs.h 2010-06-28 17:44:27 +0000
32+++ plugin/pbxt/src/xt_defs.h 2010-08-26 16:06:42 +0000
33@@ -837,7 +837,7 @@
34 #define STRUCT_TABLE class drizzled::TableShare
35 #define TABLE_SHARE TableShare
36 #define GET_TABLE_SHARE(x) (x)
37-#define GET_TABLE_FIELDS(x) (&(x)->getFields()[0])
38+#define GET_TABLE_FIELDS(x) ((x)->getFields(true))
39
40 #define MYSQL_TYPE_STRING DRIZZLE_TYPE_VARCHAR
41 #define MYSQL_TYPE_VARCHAR DRIZZLE_TYPE_VARCHAR