Merge lp:~mordred/drizzle/one-more-stab-at-boolean into lp:drizzle/7.0
- one-more-stab-at-boolean
- Merge into 7.0
Proposed by
Monty Taylor
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brian Aker | ||||
Approved revision: | 2194 | ||||
Merged at revision: | 2190 | ||||
Proposed branch: | lp:~mordred/drizzle/one-more-stab-at-boolean | ||||
Merge into: | lp:drizzle/7.0 | ||||
Diff against target: |
630 lines (+272/-49) 14 files modified
client/drizzle.cc (+127/-9) client/drizzledump.cc (+7/-7) client/drizzledump_data.cc (+11/-13) client/drizzledump_data.h (+4/-7) client/drizzledump_drizzle.cc (+4/-4) client/drizzletest.cc (+38/-3) client/include.am (+1/-0) client/server_detect.h (+61/-0) drizzled/field/boolean.cc (+2/-0) libdrizzle/column.c (+1/-1) libdrizzle/constants.h (+5/-1) plugin/mysql_protocol/mysql_protocol.cc (+8/-1) po/Makefile.in.in (+1/-1) tests/r/show_check.result (+2/-2) |
||||
To merge this branch: | bzr merge lp:~mordred/drizzle/one-more-stab-at-boolean | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Hutchings | Approve | ||
Review via email: mp+50675@code.launchpad.net |
Commit message
Description of the change
Gets us use of the boolean stuff via mysql_protocol for MySQL clients, but keeps the TRUE/FALSE YES/NO behavior in drizzle context.
To post a comment you must log in.
- 2194. By Monty Taylor
-
Fixed two tiny things.
Revision history for this message
Brian Aker (brianaker) wrote : | # |
Nice hack :)
Revision history for this message
Monty Taylor (mordred) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/21/2011 05:39 PM, Brian Aker wrote:
> Nice hack :)
Thanks! ;)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1
3I4AnA5pWfV1efI
=yx2q
-----END PGP SIGNATURE-----
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'client/drizzle.cc' | |||
2 | --- client/drizzle.cc 2011-02-17 00:14:13 +0000 | |||
3 | +++ client/drizzle.cc 2011-02-22 00:33:14 +0000 | |||
4 | @@ -37,7 +37,8 @@ | |||
5 | 37 | #include <config.h> | 37 | #include <config.h> |
6 | 38 | #include <libdrizzle/drizzle_client.h> | 38 | #include <libdrizzle/drizzle_client.h> |
7 | 39 | 39 | ||
9 | 40 | #include <client/get_password.h> | 40 | #include "server_detect.h" |
10 | 41 | #include "get_password.h" | ||
11 | 41 | 42 | ||
12 | 42 | #include <boost/date_time/posix_time/posix_time.hpp> | 43 | #include <boost/date_time/posix_time/posix_time.hpp> |
13 | 43 | 44 | ||
14 | @@ -307,6 +308,7 @@ | |||
15 | 307 | static uint32_t select_limit; | 308 | static uint32_t select_limit; |
16 | 308 | static uint32_t max_join_size; | 309 | static uint32_t max_join_size; |
17 | 309 | static uint32_t opt_connect_timeout= 0; | 310 | static uint32_t opt_connect_timeout= 0; |
18 | 311 | static ServerDetect::server_type server_type= ServerDetect::SERVER_UNKNOWN_FOUND; | ||
19 | 310 | std::string current_db, | 312 | std::string current_db, |
20 | 311 | delimiter_str, | 313 | delimiter_str, |
21 | 312 | current_host, | 314 | current_host, |
22 | @@ -3128,11 +3130,15 @@ | |||
23 | 3128 | drizzle_return_t ret; | 3130 | drizzle_return_t ret; |
24 | 3129 | drizzle_column_st *field; | 3131 | drizzle_column_st *field; |
25 | 3130 | std::vector<bool> num_flag; | 3132 | std::vector<bool> num_flag; |
26 | 3133 | std::vector<bool> boolean_flag; | ||
27 | 3134 | std::vector<bool> ansi_boolean_flag; | ||
28 | 3131 | string separator; | 3135 | string separator; |
29 | 3132 | 3136 | ||
30 | 3133 | separator.reserve(256); | 3137 | separator.reserve(256); |
31 | 3134 | 3138 | ||
32 | 3135 | num_flag.resize(drizzle_result_column_count(result)); | 3139 | num_flag.resize(drizzle_result_column_count(result)); |
33 | 3140 | boolean_flag.resize(drizzle_result_column_count(result)); | ||
34 | 3141 | ansi_boolean_flag.resize(drizzle_result_column_count(result)); | ||
35 | 3136 | if (column_types_flag) | 3142 | if (column_types_flag) |
36 | 3137 | { | 3143 | { |
37 | 3138 | print_field_types(result); | 3144 | print_field_types(result); |
38 | @@ -3175,6 +3181,14 @@ | |||
39 | 3175 | // Room for "NULL" | 3181 | // Room for "NULL" |
40 | 3176 | length=4; | 3182 | length=4; |
41 | 3177 | } | 3183 | } |
42 | 3184 | if ((length < 5) and | ||
43 | 3185 | (server_type == ServerDetect::SERVER_DRIZZLE_FOUND) and | ||
44 | 3186 | (drizzle_column_type(field) == DRIZZLE_COLUMN_TYPE_TINY) and | ||
45 | 3187 | (drizzle_column_type(field) & DRIZZLE_COLUMN_FLAGS_UNSIGNED)) | ||
46 | 3188 | { | ||
47 | 3189 | // Room for "FALSE" | ||
48 | 3190 | length= 5; | ||
49 | 3191 | } | ||
50 | 3178 | drizzle_column_set_max_size(field, length); | 3192 | drizzle_column_set_max_size(field, length); |
51 | 3179 | 3193 | ||
52 | 3180 | for (x=0; x< (length+2); x++) | 3194 | for (x=0; x< (length+2); x++) |
53 | @@ -3198,6 +3212,24 @@ | |||
54 | 3198 | drizzle_column_name(field)); | 3212 | drizzle_column_name(field)); |
55 | 3199 | num_flag[off]= ((drizzle_column_type(field) <= DRIZZLE_COLUMN_TYPE_LONGLONG) || | 3213 | num_flag[off]= ((drizzle_column_type(field) <= DRIZZLE_COLUMN_TYPE_LONGLONG) || |
56 | 3200 | (drizzle_column_type(field) == DRIZZLE_COLUMN_TYPE_NEWDECIMAL)); | 3214 | (drizzle_column_type(field) == DRIZZLE_COLUMN_TYPE_NEWDECIMAL)); |
57 | 3215 | if ((server_type == ServerDetect::SERVER_DRIZZLE_FOUND) and | ||
58 | 3216 | (drizzle_column_type(field) == DRIZZLE_COLUMN_TYPE_TINY)) | ||
59 | 3217 | { | ||
60 | 3218 | if ((drizzle_column_flags(field) & DRIZZLE_COLUMN_FLAGS_UNSIGNED)) | ||
61 | 3219 | { | ||
62 | 3220 | ansi_boolean_flag[off]= true; | ||
63 | 3221 | } | ||
64 | 3222 | else | ||
65 | 3223 | { | ||
66 | 3224 | ansi_boolean_flag[off]= false; | ||
67 | 3225 | } | ||
68 | 3226 | boolean_flag[off]= true; | ||
69 | 3227 | num_flag[off]= false; | ||
70 | 3228 | } | ||
71 | 3229 | else | ||
72 | 3230 | { | ||
73 | 3231 | boolean_flag[off]= false; | ||
74 | 3232 | } | ||
75 | 3201 | } | 3233 | } |
76 | 3202 | (void) tee_fputs("\n", PAGER); | 3234 | (void) tee_fputs("\n", PAGER); |
77 | 3203 | tee_puts((char*) separator.c_str(), PAGER); | 3235 | tee_puts((char*) separator.c_str(), PAGER); |
78 | @@ -3236,6 +3268,35 @@ | |||
79 | 3236 | buffer= "NULL"; | 3268 | buffer= "NULL"; |
80 | 3237 | data_length= 4; | 3269 | data_length= 4; |
81 | 3238 | } | 3270 | } |
82 | 3271 | else if (boolean_flag[off]) | ||
83 | 3272 | { | ||
84 | 3273 | if (strncmp(cur[off],"1", 1) == 0) | ||
85 | 3274 | { | ||
86 | 3275 | if (ansi_boolean_flag[off]) | ||
87 | 3276 | { | ||
88 | 3277 | buffer= "YES"; | ||
89 | 3278 | data_length= 3; | ||
90 | 3279 | } | ||
91 | 3280 | else | ||
92 | 3281 | { | ||
93 | 3282 | buffer= "TRUE"; | ||
94 | 3283 | data_length= 4; | ||
95 | 3284 | } | ||
96 | 3285 | } | ||
97 | 3286 | else | ||
98 | 3287 | { | ||
99 | 3288 | if (ansi_boolean_flag[off]) | ||
100 | 3289 | { | ||
101 | 3290 | buffer= "NO"; | ||
102 | 3291 | data_length= 2; | ||
103 | 3292 | } | ||
104 | 3293 | else | ||
105 | 3294 | { | ||
106 | 3295 | buffer= "FALSE"; | ||
107 | 3296 | data_length= 5; | ||
108 | 3297 | } | ||
109 | 3298 | } | ||
110 | 3299 | } | ||
111 | 3239 | else | 3300 | else |
112 | 3240 | { | 3301 | { |
113 | 3241 | buffer= cur[off]; | 3302 | buffer= cur[off]; |
114 | @@ -3509,16 +3570,41 @@ | |||
115 | 3509 | drizzle_return_t ret; | 3570 | drizzle_return_t ret; |
116 | 3510 | drizzle_column_st *field; | 3571 | drizzle_column_st *field; |
117 | 3511 | size_t *lengths; | 3572 | size_t *lengths; |
120 | 3512 | 3573 | std::vector<bool> boolean_flag; | |
121 | 3513 | if (opt_silent < 2 && column_names) | 3574 | std::vector<bool> ansi_boolean_flag; |
122 | 3575 | |||
123 | 3576 | boolean_flag.resize(drizzle_result_column_count(result)); | ||
124 | 3577 | ansi_boolean_flag.resize(drizzle_result_column_count(result)); | ||
125 | 3578 | |||
126 | 3579 | int first=0; | ||
127 | 3580 | for (uint32_t off= 0; (field = drizzle_column_next(result)); off++) | ||
128 | 3514 | { | 3581 | { |
131 | 3515 | int first=0; | 3582 | if (opt_silent < 2 && column_names) |
130 | 3516 | while ((field = drizzle_column_next(result))) | ||
132 | 3517 | { | 3583 | { |
133 | 3518 | if (first++) | 3584 | if (first++) |
134 | 3519 | (void) tee_fputs("\t", PAGER); | 3585 | (void) tee_fputs("\t", PAGER); |
135 | 3520 | (void) tee_fputs(drizzle_column_name(field), PAGER); | 3586 | (void) tee_fputs(drizzle_column_name(field), PAGER); |
136 | 3521 | } | 3587 | } |
137 | 3588 | if ((server_type == ServerDetect::SERVER_DRIZZLE_FOUND) and | ||
138 | 3589 | (drizzle_column_type(field) == DRIZZLE_COLUMN_TYPE_TINY)) | ||
139 | 3590 | { | ||
140 | 3591 | if ((drizzle_column_flags(field) & DRIZZLE_COLUMN_FLAGS_UNSIGNED)) | ||
141 | 3592 | { | ||
142 | 3593 | ansi_boolean_flag[off]= true; | ||
143 | 3594 | } | ||
144 | 3595 | else | ||
145 | 3596 | { | ||
146 | 3597 | ansi_boolean_flag[off]= false; | ||
147 | 3598 | } | ||
148 | 3599 | boolean_flag[off]= true; | ||
149 | 3600 | } | ||
150 | 3601 | else | ||
151 | 3602 | { | ||
152 | 3603 | boolean_flag[off]= false; | ||
153 | 3604 | } | ||
154 | 3605 | } | ||
155 | 3606 | if (opt_silent < 2 && column_names) | ||
156 | 3607 | { | ||
157 | 3522 | (void) tee_fputs("\n", PAGER); | 3608 | (void) tee_fputs("\n", PAGER); |
158 | 3523 | } | 3609 | } |
159 | 3524 | while (1) | 3610 | while (1) |
160 | @@ -3539,11 +3625,40 @@ | |||
161 | 3539 | break; | 3625 | break; |
162 | 3540 | 3626 | ||
163 | 3541 | lengths= drizzle_row_field_sizes(result); | 3627 | lengths= drizzle_row_field_sizes(result); |
166 | 3542 | safe_put_field(cur[0],lengths[0]); | 3628 | drizzle_column_seek(result, 0); |
167 | 3543 | for (uint32_t off=1 ; off < drizzle_result_column_count(result); off++) | 3629 | for (uint32_t off=0 ; off < drizzle_result_column_count(result); off++) |
168 | 3544 | { | 3630 | { |
171 | 3545 | (void) tee_fputs("\t", PAGER); | 3631 | if (off != 0) |
172 | 3546 | safe_put_field(cur[off], lengths[off]); | 3632 | (void) tee_fputs("\t", PAGER); |
173 | 3633 | if (boolean_flag[off]) | ||
174 | 3634 | { | ||
175 | 3635 | if (strncmp(cur[off],"1", 1) == 0) | ||
176 | 3636 | { | ||
177 | 3637 | if (ansi_boolean_flag[off]) | ||
178 | 3638 | { | ||
179 | 3639 | safe_put_field("YES", 3); | ||
180 | 3640 | } | ||
181 | 3641 | else | ||
182 | 3642 | { | ||
183 | 3643 | safe_put_field("TRUE", 4); | ||
184 | 3644 | } | ||
185 | 3645 | } | ||
186 | 3646 | else | ||
187 | 3647 | { | ||
188 | 3648 | if (ansi_boolean_flag[off]) | ||
189 | 3649 | { | ||
190 | 3650 | safe_put_field("NO", 2); | ||
191 | 3651 | } | ||
192 | 3652 | else | ||
193 | 3653 | { | ||
194 | 3654 | safe_put_field("FALSE", 5); | ||
195 | 3655 | } | ||
196 | 3656 | } | ||
197 | 3657 | } | ||
198 | 3658 | else | ||
199 | 3659 | { | ||
200 | 3660 | safe_put_field(cur[off], lengths[off]); | ||
201 | 3661 | } | ||
202 | 3547 | } | 3662 | } |
203 | 3548 | (void) tee_fputs("\n", PAGER); | 3663 | (void) tee_fputs("\n", PAGER); |
204 | 3549 | if (quick) | 3664 | if (quick) |
205 | @@ -4108,6 +4223,9 @@ | |||
206 | 4108 | } | 4223 | } |
207 | 4109 | connected=1; | 4224 | connected=1; |
208 | 4110 | 4225 | ||
209 | 4226 | ServerDetect server_detect(&con); | ||
210 | 4227 | server_type= server_detect.getServerType(); | ||
211 | 4228 | |||
212 | 4111 | build_completion_hash(opt_rehash, 1); | 4229 | build_completion_hash(opt_rehash, 1); |
213 | 4112 | return 0; | 4230 | return 0; |
214 | 4113 | } | 4231 | } |
215 | 4114 | 4232 | ||
216 | === modified file 'client/drizzledump.cc' | |||
217 | --- client/drizzledump.cc 2011-02-15 23:05:12 +0000 | |||
218 | +++ client/drizzledump.cc 2011-02-22 00:33:14 +0000 | |||
219 | @@ -241,9 +241,9 @@ | |||
220 | 241 | cout << "-- Host: " << current_host << " Database: " << db_name << endl; | 241 | cout << "-- Host: " << current_host << " Database: " << db_name << endl; |
221 | 242 | cout << "-- ------------------------------------------------------" << endl; | 242 | cout << "-- ------------------------------------------------------" << endl; |
222 | 243 | cout << "-- Server version\t" << db_connection->getServerVersion(); | 243 | cout << "-- Server version\t" << db_connection->getServerVersion(); |
224 | 244 | if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) | 244 | if (db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) |
225 | 245 | cout << " (MySQL server)"; | 245 | cout << " (MySQL server)"; |
227 | 246 | else if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_DRIZZLE_FOUND) | 246 | else if (db_connection->getServerType() == ServerDetect::SERVER_DRIZZLE_FOUND) |
228 | 247 | cout << " (Drizzle server)"; | 247 | cout << " (Drizzle server)"; |
229 | 248 | cout << endl << endl; | 248 | cout << endl << endl; |
230 | 249 | } | 249 | } |
231 | @@ -351,7 +351,7 @@ | |||
232 | 351 | std::cerr << _("-- Retrieving database structures...") << std::endl; | 351 | std::cerr << _("-- Retrieving database structures...") << std::endl; |
233 | 352 | 352 | ||
234 | 353 | /* Blocking the MySQL privilege tables too because we can't import them due to bug#646187 */ | 353 | /* Blocking the MySQL privilege tables too because we can't import them due to bug#646187 */ |
236 | 354 | if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) | 354 | if (db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) |
237 | 355 | query= "SELECT SCHEMA_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('information_schema', 'performance_schema', 'mysql')"; | 355 | query= "SELECT SCHEMA_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('information_schema', 'performance_schema', 'mysql')"; |
238 | 356 | else | 356 | else |
239 | 357 | query= "SELECT SCHEMA_NAME, DEFAULT_COLLATION_NAME FROM DATA_DICTIONARY.SCHEMAS WHERE SCHEMA_NAME NOT IN ('information_schema','data_dictionary')"; | 357 | query= "SELECT SCHEMA_NAME, DEFAULT_COLLATION_NAME FROM DATA_DICTIONARY.SCHEMAS WHERE SCHEMA_NAME NOT IN ('information_schema','data_dictionary')"; |
240 | @@ -360,7 +360,7 @@ | |||
241 | 360 | while ((row= drizzle_row_next(tableres))) | 360 | while ((row= drizzle_row_next(tableres))) |
242 | 361 | { | 361 | { |
243 | 362 | std::string database_name(row[0]); | 362 | std::string database_name(row[0]); |
245 | 363 | if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) | 363 | if (db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) |
246 | 364 | database= new DrizzleDumpDatabaseMySQL(database_name, db_connection); | 364 | database= new DrizzleDumpDatabaseMySQL(database_name, db_connection); |
247 | 365 | else | 365 | else |
248 | 366 | database= new DrizzleDumpDatabaseDrizzle(database_name, db_connection); | 366 | database= new DrizzleDumpDatabaseDrizzle(database_name, db_connection); |
249 | @@ -383,7 +383,7 @@ | |||
250 | 383 | for (vector<string>::const_iterator it= db_names.begin(); it != db_names.end(); ++it) | 383 | for (vector<string>::const_iterator it= db_names.begin(); it != db_names.end(); ++it) |
251 | 384 | { | 384 | { |
252 | 385 | temp= *it; | 385 | temp= *it; |
254 | 386 | if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) | 386 | if (db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) |
255 | 387 | database= new DrizzleDumpDatabaseMySQL(temp, db_connection); | 387 | database= new DrizzleDumpDatabaseMySQL(temp, db_connection); |
256 | 388 | else | 388 | else |
257 | 389 | database= new DrizzleDumpDatabaseDrizzle(temp, db_connection); | 389 | database= new DrizzleDumpDatabaseDrizzle(temp, db_connection); |
258 | @@ -396,7 +396,7 @@ | |||
259 | 396 | { | 396 | { |
260 | 397 | DrizzleDumpDatabase *database; | 397 | DrizzleDumpDatabase *database; |
261 | 398 | 398 | ||
263 | 399 | if (db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) | 399 | if (db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) |
264 | 400 | database= new DrizzleDumpDatabaseMySQL(db, db_connection); | 400 | database= new DrizzleDumpDatabaseMySQL(db, db_connection); |
265 | 401 | else | 401 | else |
266 | 402 | database= new DrizzleDumpDatabaseDrizzle(db, db_connection); | 402 | database= new DrizzleDumpDatabaseDrizzle(db, db_connection); |
267 | @@ -742,7 +742,7 @@ | |||
268 | 742 | maybe_exit(EX_DRIZZLEERR); | 742 | maybe_exit(EX_DRIZZLEERR); |
269 | 743 | } | 743 | } |
270 | 744 | 744 | ||
272 | 745 | if ((db_connection->getServerType() == DrizzleDumpConnection::SERVER_MYSQL_FOUND) and (not opt_data_is_mangled)) | 745 | if ((db_connection->getServerType() == ServerDetect::SERVER_MYSQL_FOUND) and (not opt_data_is_mangled)) |
273 | 746 | db_connection->queryNoResult("SET NAMES 'utf8'"); | 746 | db_connection->queryNoResult("SET NAMES 'utf8'"); |
274 | 747 | 747 | ||
275 | 748 | if (vm.count("destination-type")) | 748 | if (vm.count("destination-type")) |
276 | 749 | 749 | ||
277 | === modified file 'client/drizzledump_data.cc' | |||
278 | --- client/drizzledump_data.cc 2010-12-08 07:35:23 +0000 | |||
279 | +++ client/drizzledump_data.cc 2011-02-22 00:33:14 +0000 | |||
280 | @@ -373,6 +373,13 @@ | |||
281 | 373 | { | 373 | { |
282 | 374 | os << "NULL"; | 374 | os << "NULL"; |
283 | 375 | } | 375 | } |
284 | 376 | else if (obj.table->fields[i]->type.compare("BOOLEAN") == 0) | ||
285 | 377 | { | ||
286 | 378 | if (strncmp(row[i], "1", 1) == 0) | ||
287 | 379 | os << "TRUE"; | ||
288 | 380 | else | ||
289 | 381 | os << "FALSE"; | ||
290 | 382 | } | ||
291 | 376 | else | 383 | else |
292 | 377 | os << "'" << DrizzleDumpData::escape(row[i], row_sizes[i]) << "'"; | 384 | os << "'" << DrizzleDumpData::escape(row[i], row_sizes[i]) << "'"; |
293 | 378 | byte_counter+= 3; | 385 | byte_counter+= 3; |
294 | @@ -561,19 +568,10 @@ | |||
295 | 561 | throw std::exception(); | 568 | throw std::exception(); |
296 | 562 | } | 569 | } |
297 | 563 | 570 | ||
311 | 564 | boost::match_flag_type flags = boost::match_default; | 571 | ServerDetect server_detect= ServerDetect(&connection); |
312 | 565 | 572 | ||
313 | 566 | boost::regex mysql_regex("(5\\.[0-9]+\\.[0-9]+)"); | 573 | serverType= server_detect.getServerType(); |
314 | 567 | boost::regex drizzle_regex("(20[0-9]{2}\\.(0[1-9]|1[012])\\.[0-9]+)"); | 574 | serverVersion= server_detect.getServerVersion(); |
302 | 568 | |||
303 | 569 | std::string version(getServerVersion()); | ||
304 | 570 | |||
305 | 571 | if (regex_search(version, mysql_regex, flags)) | ||
306 | 572 | serverType= SERVER_MYSQL_FOUND; | ||
307 | 573 | else if (regex_search(version, drizzle_regex, flags)) | ||
308 | 574 | serverType= SERVER_DRIZZLE_FOUND; | ||
309 | 575 | else | ||
310 | 576 | serverType= SERVER_UNKNOWN_FOUND; | ||
315 | 577 | } | 575 | } |
316 | 578 | 576 | ||
317 | 579 | drizzle_result_st* DrizzleDumpConnection::query(std::string &str_query) | 577 | drizzle_result_st* DrizzleDumpConnection::query(std::string &str_query) |
318 | 580 | 578 | ||
319 | === modified file 'client/drizzledump_data.h' | |||
320 | --- client/drizzledump_data.h 2010-12-08 07:35:23 +0000 | |||
321 | +++ client/drizzledump_data.h 2011-02-22 00:33:14 +0000 | |||
322 | @@ -22,6 +22,7 @@ | |||
323 | 22 | 22 | ||
324 | 23 | #define DRIZZLE_MAX_LINE_LENGTH 1024*1024L-1025 | 23 | #define DRIZZLE_MAX_LINE_LENGTH 1024*1024L-1025 |
325 | 24 | #include "client_priv.h" | 24 | #include "client_priv.h" |
326 | 25 | #include "server_detect.h" | ||
327 | 25 | #include <string> | 26 | #include <string> |
328 | 26 | #include <iostream> | 27 | #include <iostream> |
329 | 27 | #include <iomanip> | 28 | #include <iomanip> |
330 | @@ -214,14 +215,10 @@ | |||
331 | 214 | drizzle_con_st connection; | 215 | drizzle_con_st connection; |
332 | 215 | std::string hostName; | 216 | std::string hostName; |
333 | 216 | bool drizzleProtocol; | 217 | bool drizzleProtocol; |
335 | 217 | int serverType; | 218 | ServerDetect::server_type serverType; |
336 | 219 | std::string serverVersion; | ||
337 | 218 | 220 | ||
338 | 219 | public: | 221 | public: |
339 | 220 | enum server_type { | ||
340 | 221 | SERVER_MYSQL_FOUND, | ||
341 | 222 | SERVER_DRIZZLE_FOUND, | ||
342 | 223 | SERVER_UNKNOWN_FOUND | ||
343 | 224 | }; | ||
344 | 225 | DrizzleDumpConnection(std::string &host, uint16_t port, | 222 | DrizzleDumpConnection(std::string &host, uint16_t port, |
345 | 226 | std::string &username, std::string &password, bool drizzle_protocol); | 223 | std::string &username, std::string &password, bool drizzle_protocol); |
346 | 227 | ~DrizzleDumpConnection(); | 224 | ~DrizzleDumpConnection(); |
347 | @@ -244,7 +241,7 @@ | |||
348 | 244 | bool setDB(std::string databaseName); | 241 | bool setDB(std::string databaseName); |
349 | 245 | bool usingDrizzleProtocol(void) const { return drizzleProtocol; } | 242 | bool usingDrizzleProtocol(void) const { return drizzleProtocol; } |
350 | 246 | bool getServerType(void) const { return serverType; } | 243 | bool getServerType(void) const { return serverType; } |
352 | 247 | const char* getServerVersion(void) { return drizzle_con_server_version(&connection); } | 244 | std::string getServerVersion(void) const { return serverVersion; } |
353 | 248 | }; | 245 | }; |
354 | 249 | 246 | ||
355 | 250 | class DrizzleStringBuf : public std::streambuf | 247 | class DrizzleStringBuf : public std::streambuf |
356 | 251 | 248 | ||
357 | === modified file 'client/drizzledump_drizzle.cc' | |||
358 | --- client/drizzledump_drizzle.cc 2010-12-06 12:15:06 +0000 | |||
359 | +++ client/drizzledump_drizzle.cc 2011-02-22 00:33:14 +0000 | |||
360 | @@ -195,9 +195,9 @@ | |||
361 | 195 | else | 195 | else |
362 | 196 | field->defaultValue= ""; | 196 | field->defaultValue= ""; |
363 | 197 | 197 | ||
367 | 198 | field->isNull= (strcmp(row[4], "YES") == 0) ? true : false; | 198 | field->isNull= (boost::lexical_cast<uint32_t>(row[4])) ? true : false; |
368 | 199 | field->isAutoIncrement= (strcmp(row[9], "YES") == 0) ? true : false; | 199 | field->isAutoIncrement= (boost::lexical_cast<uint32_t>(row[9])) ? true : false; |
369 | 200 | field->defaultIsNull= (strcmp(row[3], "YES") == 0) ? true : false; | 200 | field->defaultIsNull= (boost::lexical_cast<uint32_t>(row[3])) ? true : false; |
370 | 201 | field->enumValues= (row[10]) ? row[10] : ""; | 201 | field->enumValues= (row[10]) ? row[10] : ""; |
371 | 202 | field->length= (row[5]) ? boost::lexical_cast<uint32_t>(row[5]) : 0; | 202 | field->length= (row[5]) ? boost::lexical_cast<uint32_t>(row[5]) : 0; |
372 | 203 | field->decimalPrecision= (row[6]) ? boost::lexical_cast<uint32_t>(row[6]) : 0; | 203 | field->decimalPrecision= (row[6]) ? boost::lexical_cast<uint32_t>(row[6]) : 0; |
373 | @@ -244,7 +244,7 @@ | |||
374 | 244 | indexes.push_back(index); | 244 | indexes.push_back(index); |
375 | 245 | index = new DrizzleDumpIndexDrizzle(indexName, dcon); | 245 | index = new DrizzleDumpIndexDrizzle(indexName, dcon); |
376 | 246 | index->isPrimary= (strcmp(row[0], "PRIMARY") == 0); | 246 | index->isPrimary= (strcmp(row[0], "PRIMARY") == 0); |
378 | 247 | index->isUnique= (strcmp(row[3], "YES") == 0); | 247 | index->isUnique= boost::lexical_cast<uint32_t>(row[3]); |
379 | 248 | index->isHash= 0; | 248 | index->isHash= 0; |
380 | 249 | index->length= (row[4]) ? boost::lexical_cast<uint32_t>(row[4]) : 0; | 249 | index->length= (row[4]) ? boost::lexical_cast<uint32_t>(row[4]) : 0; |
381 | 250 | lastKey= row[0]; | 250 | lastKey= row[0]; |
382 | 251 | 251 | ||
383 | === modified file 'client/drizzletest.cc' | |||
384 | --- client/drizzletest.cc 2011-02-17 00:14:13 +0000 | |||
385 | +++ client/drizzletest.cc 2011-02-22 00:33:14 +0000 | |||
386 | @@ -4697,8 +4697,36 @@ | |||
387 | 4697 | for (i = 0; i < num_fields; i++) | 4697 | for (i = 0; i < num_fields; i++) |
388 | 4698 | { | 4698 | { |
389 | 4699 | column= drizzle_column_next(res); | 4699 | column= drizzle_column_next(res); |
392 | 4700 | append_field(ds, i, column, | 4700 | if (row[i] && (drizzle_column_type(column) == DRIZZLE_COLUMN_TYPE_TINY)) |
393 | 4701 | (const char*)row[i], lengths[i], !row[i]); | 4701 | { |
394 | 4702 | if (boost::lexical_cast<uint32_t>(row[i])) | ||
395 | 4703 | { | ||
396 | 4704 | if ((drizzle_column_flags(column) & DRIZZLE_COLUMN_FLAGS_UNSIGNED)) | ||
397 | 4705 | { | ||
398 | 4706 | append_field(ds, i, column, "YES", 3, false); | ||
399 | 4707 | } | ||
400 | 4708 | else | ||
401 | 4709 | { | ||
402 | 4710 | append_field(ds, i, column, "TRUE", 4, false); | ||
403 | 4711 | } | ||
404 | 4712 | } | ||
405 | 4713 | else | ||
406 | 4714 | { | ||
407 | 4715 | if ((drizzle_column_flags(column) & DRIZZLE_COLUMN_FLAGS_UNSIGNED)) | ||
408 | 4716 | { | ||
409 | 4717 | append_field(ds, i, column, "NO", 2, false); | ||
410 | 4718 | } | ||
411 | 4719 | else | ||
412 | 4720 | { | ||
413 | 4721 | append_field(ds, i, column, "FALSE", 5, false); | ||
414 | 4722 | } | ||
415 | 4723 | } | ||
416 | 4724 | } | ||
417 | 4725 | else | ||
418 | 4726 | { | ||
419 | 4727 | append_field(ds, i, column, | ||
420 | 4728 | (const char*)row[i], lengths[i], !row[i]); | ||
421 | 4729 | } | ||
422 | 4702 | } | 4730 | } |
423 | 4703 | if (!display_result_vertically) | 4731 | if (!display_result_vertically) |
424 | 4704 | ds->append("\n"); | 4732 | ds->append("\n"); |
425 | @@ -4742,7 +4770,14 @@ | |||
426 | 4742 | ds->append("\t", 1); | 4770 | ds->append("\t", 1); |
427 | 4743 | replace_append_uint(ds, drizzle_column_size(column)); | 4771 | replace_append_uint(ds, drizzle_column_size(column)); |
428 | 4744 | ds->append("\t", 1); | 4772 | ds->append("\t", 1); |
430 | 4745 | replace_append_uint(ds, drizzle_column_max_size(column)); | 4773 | if (drizzle_column_type(column) == DRIZZLE_COLUMN_TYPE_TINY) |
431 | 4774 | { | ||
432 | 4775 | replace_append_uint(ds, 1); | ||
433 | 4776 | } | ||
434 | 4777 | else | ||
435 | 4778 | { | ||
436 | 4779 | replace_append_uint(ds, drizzle_column_max_size(column)); | ||
437 | 4780 | } | ||
438 | 4746 | ds->append("\t", 1); | 4781 | ds->append("\t", 1); |
439 | 4747 | ds->append((char*) ((drizzle_column_flags(column) & DRIZZLE_COLUMN_FLAGS_NOT_NULL) ? "N" : "Y"), 1); | 4782 | ds->append((char*) ((drizzle_column_flags(column) & DRIZZLE_COLUMN_FLAGS_NOT_NULL) ? "N" : "Y"), 1); |
440 | 4748 | ds->append("\t", 1); | 4783 | ds->append("\t", 1); |
441 | 4749 | 4784 | ||
442 | === modified file 'client/include.am' | |||
443 | --- client/include.am 2010-12-28 20:54:15 +0000 | |||
444 | +++ client/include.am 2011-02-22 00:33:14 +0000 | |||
445 | @@ -54,6 +54,7 @@ | |||
446 | 54 | client/drizzledump_drizzle.h \ | 54 | client/drizzledump_drizzle.h \ |
447 | 55 | client/drizzledump_mysql.h \ | 55 | client/drizzledump_mysql.h \ |
448 | 56 | client/option_string.h \ | 56 | client/option_string.h \ |
449 | 57 | client/server_detect.h \ | ||
450 | 57 | client/statement.h \ | 58 | client/statement.h \ |
451 | 58 | client/stats.h \ | 59 | client/stats.h \ |
452 | 59 | client/thread_context.h \ | 60 | client/thread_context.h \ |
453 | 60 | 61 | ||
454 | === added file 'client/server_detect.h' | |||
455 | --- client/server_detect.h 1970-01-01 00:00:00 +0000 | |||
456 | +++ client/server_detect.h 2011-02-22 00:33:14 +0000 | |||
457 | @@ -0,0 +1,61 @@ | |||
458 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
459 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
460 | 3 | * | ||
461 | 4 | * Copyright (C) 2011 Andrew Hutchings | ||
462 | 5 | * | ||
463 | 6 | * This program is free software; you can redistribute it and/or modify | ||
464 | 7 | * it under the terms of the GNU General Public License as published by | ||
465 | 8 | * the Free Software Foundation; version 2 of the License. | ||
466 | 9 | * | ||
467 | 10 | * This program is distributed in the hope that it will be useful, | ||
468 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
469 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
470 | 13 | * GNU General Public License for more details. | ||
471 | 14 | * | ||
472 | 15 | * You should have received a copy of the GNU General Public License | ||
473 | 16 | * along with this program; if not, write to the Free Software | ||
474 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
475 | 18 | */ | ||
476 | 19 | |||
477 | 20 | #ifndef CLIENT_SERVER_DETECT_H | ||
478 | 21 | #define CLIENT_SERVER_DETECT_H | ||
479 | 22 | |||
480 | 23 | #include <boost/regex.hpp> | ||
481 | 24 | |||
482 | 25 | class ServerDetect | ||
483 | 26 | { | ||
484 | 27 | public: | ||
485 | 28 | enum server_type { | ||
486 | 29 | SERVER_MYSQL_FOUND, | ||
487 | 30 | SERVER_DRIZZLE_FOUND, | ||
488 | 31 | SERVER_UNKNOWN_FOUND | ||
489 | 32 | }; | ||
490 | 33 | |||
491 | 34 | server_type getServerType() { return type; } | ||
492 | 35 | std::string& getServerVersion() { return version; } | ||
493 | 36 | |||
494 | 37 | ServerDetect(drizzle_con_st *connection) : | ||
495 | 38 | type(SERVER_UNKNOWN_FOUND), | ||
496 | 39 | version("") | ||
497 | 40 | { | ||
498 | 41 | boost::match_flag_type flags = boost::match_default; | ||
499 | 42 | |||
500 | 43 | boost::regex mysql_regex("(5\\.[0-9]+\\.[0-9]+)"); | ||
501 | 44 | boost::regex drizzle_regex("(20[0-9]{2}\\.(0[1-9]|1[012])\\.[0-9]+)"); | ||
502 | 45 | |||
503 | 46 | version= drizzle_con_server_version(connection); | ||
504 | 47 | |||
505 | 48 | if (regex_search(version, mysql_regex, flags)) | ||
506 | 49 | type= SERVER_MYSQL_FOUND; | ||
507 | 50 | else if (regex_search(version, drizzle_regex, flags)) | ||
508 | 51 | type= SERVER_DRIZZLE_FOUND; | ||
509 | 52 | else | ||
510 | 53 | type= SERVER_UNKNOWN_FOUND; | ||
511 | 54 | } | ||
512 | 55 | |||
513 | 56 | private: | ||
514 | 57 | server_type type; | ||
515 | 58 | std::string version; | ||
516 | 59 | }; | ||
517 | 60 | |||
518 | 61 | #endif /* CLIENT_SERVER_DETECT_H */ | ||
519 | 0 | 62 | ||
520 | === modified file 'drizzled/field/boolean.cc' | |||
521 | --- drizzled/field/boolean.cc 2011-02-19 01:04:19 +0000 | |||
522 | +++ drizzled/field/boolean.cc 2011-02-22 00:33:14 +0000 | |||
523 | @@ -60,6 +60,8 @@ | |||
524 | 60 | field_name_arg), | 60 | field_name_arg), |
525 | 61 | ansi_display(ansi_display_arg) | 61 | ansi_display(ansi_display_arg) |
526 | 62 | { | 62 | { |
527 | 63 | if (ansi_display) | ||
528 | 64 | flags|= UNSIGNED_FLAG; | ||
529 | 63 | } | 65 | } |
530 | 64 | 66 | ||
531 | 65 | int Boolean::cmp(const unsigned char *a, const unsigned char *b) | 67 | int Boolean::cmp(const unsigned char *a, const unsigned char *b) |
532 | 66 | 68 | ||
533 | === modified file 'libdrizzle/column.c' | |||
534 | --- libdrizzle/column.c 2010-12-23 18:47:57 +0000 | |||
535 | +++ libdrizzle/column.c 2011-02-22 00:33:14 +0000 | |||
536 | @@ -65,7 +65,7 @@ | |||
537 | 65 | static drizzle_column_type_drizzle_t _column_type_drizzle_map_from[]= | 65 | static drizzle_column_type_drizzle_t _column_type_drizzle_map_from[]= |
538 | 66 | { | 66 | { |
539 | 67 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, /* 0 */ | 67 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, /* 0 */ |
541 | 68 | DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY, | 68 | DRIZZLE_COLUMN_TYPE_DRIZZLE_BOOLEAN, |
542 | 69 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, | 69 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, |
543 | 70 | DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG, | 70 | DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG, |
544 | 71 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, | 71 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, |
545 | 72 | 72 | ||
546 | === modified file 'libdrizzle/constants.h' | |||
547 | --- libdrizzle/constants.h 2010-12-19 16:20:13 +0000 | |||
548 | +++ libdrizzle/constants.h 2011-02-22 00:33:14 +0000 | |||
549 | @@ -391,7 +391,11 @@ | |||
550 | 391 | DRIZZLE_COLUMN_TYPE_DRIZZLE_NEWDECIMAL, | 391 | DRIZZLE_COLUMN_TYPE_DRIZZLE_NEWDECIMAL, |
551 | 392 | DRIZZLE_COLUMN_TYPE_DRIZZLE_ENUM, | 392 | DRIZZLE_COLUMN_TYPE_DRIZZLE_ENUM, |
552 | 393 | DRIZZLE_COLUMN_TYPE_DRIZZLE_BLOB, | 393 | DRIZZLE_COLUMN_TYPE_DRIZZLE_BLOB, |
554 | 394 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX=DRIZZLE_COLUMN_TYPE_DRIZZLE_BLOB | 394 | DRIZZLE_COLUMN_TYPE_DRIZZLE_TIME, |
555 | 395 | DRIZZLE_COLUMN_TYPE_DRIZZLE_BOOLEAN, | ||
556 | 396 | DRIZZLE_COLUMN_TYPE_DRIZZLE_UUID, | ||
557 | 397 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MICROTIME, | ||
558 | 398 | DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX=DRIZZLE_COLUMN_TYPE_DRIZZLE_MICROTIME | ||
559 | 395 | } drizzle_column_type_drizzle_t; | 399 | } drizzle_column_type_drizzle_t; |
560 | 396 | 400 | ||
561 | 397 | /** | 401 | /** |
562 | 398 | 402 | ||
563 | === modified file 'plugin/mysql_protocol/mysql_protocol.cc' | |||
564 | --- plugin/mysql_protocol/mysql_protocol.cc 2011-02-20 00:09:56 +0000 | |||
565 | +++ plugin/mysql_protocol/mysql_protocol.cc 2011-02-22 00:33:14 +0000 | |||
566 | @@ -35,6 +35,8 @@ | |||
567 | 35 | 35 | ||
568 | 36 | #include <drizzled/identifier.h> | 36 | #include <drizzled/identifier.h> |
569 | 37 | 37 | ||
570 | 38 | #include <libdrizzle/constants.h> | ||
571 | 39 | |||
572 | 38 | #define PROTOCOL_VERSION 10 | 40 | #define PROTOCOL_VERSION 10 |
573 | 39 | 41 | ||
574 | 40 | namespace po= boost::program_options; | 42 | namespace po= boost::program_options; |
575 | @@ -558,7 +560,7 @@ | |||
576 | 558 | break; | 560 | break; |
577 | 559 | 561 | ||
578 | 560 | case DRIZZLE_TYPE_BOOLEAN: | 562 | case DRIZZLE_TYPE_BOOLEAN: |
580 | 561 | pos[6]= 15; | 563 | pos[6]= DRIZZLE_COLUMN_TYPE_TINY; |
581 | 562 | break; | 564 | break; |
582 | 563 | 565 | ||
583 | 564 | case DRIZZLE_TYPE_DECIMAL: | 566 | case DRIZZLE_TYPE_DECIMAL: |
584 | @@ -609,6 +611,11 @@ | |||
585 | 609 | { | 611 | { |
586 | 610 | if (from->is_null()) | 612 | if (from->is_null()) |
587 | 611 | return store(); | 613 | return store(); |
588 | 614 | if (from->type() == DRIZZLE_TYPE_BOOLEAN) | ||
589 | 615 | { | ||
590 | 616 | return store(from->val_int()); | ||
591 | 617 | } | ||
592 | 618 | |||
593 | 612 | char buff[MAX_FIELD_WIDTH]; | 619 | char buff[MAX_FIELD_WIDTH]; |
594 | 613 | String str(buff,sizeof(buff), &my_charset_bin); | 620 | String str(buff,sizeof(buff), &my_charset_bin); |
595 | 614 | 621 | ||
596 | 615 | 622 | ||
597 | === modified file 'po/Makefile.in.in' | |||
598 | --- po/Makefile.in.in 2011-02-14 20:32:29 +0000 | |||
599 | +++ po/Makefile.in.in 2011-02-22 00:33:14 +0000 | |||
600 | @@ -145,7 +145,7 @@ | |||
601 | 145 | check: all $(GETTEXT_PACKAGE).pot | 145 | check: all $(GETTEXT_PACKAGE).pot |
602 | 146 | rm -f missing notexist | 146 | rm -f missing notexist |
603 | 147 | srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m | 147 | srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m |
605 | 148 | if [ -r missing -o -r notexist -a "x${INTLTOOL_WARNINGS}" = "xyes"]; then \ | 148 | if [ -r missing -o -r notexist -a "x${INTLTOOL_WARNINGS}" = "xyes" ]; then \ |
606 | 149 | exit 1; \ | 149 | exit 1; \ |
607 | 150 | fi | 150 | fi |
608 | 151 | 151 | ||
609 | 152 | 152 | ||
610 | === modified file 'tests/r/show_check.result' | |||
611 | --- tests/r/show_check.result 2011-02-04 09:04:08 +0000 | |||
612 | +++ tests/r/show_check.result 2011-02-22 00:33:14 +0000 | |||
613 | @@ -27,7 +27,7 @@ | |||
614 | 27 | show index from t1; | 27 | show index from t1; |
615 | 28 | Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr | 28 | Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr |
616 | 29 | def data_dictionary show_indexes SHOW_INDEXES Table Table 8 1024 2 N 4097 0 45 | 29 | def data_dictionary show_indexes SHOW_INDEXES Table Table 8 1024 2 N 4097 0 45 |
618 | 30 | def data_dictionary show_indexes SHOW_INDEXES Unique Unique 8 1 3 N 4097 0 63 | 30 | def data_dictionary show_indexes SHOW_INDEXES Unique Unique 13 1 1 N 36897 0 63 |
619 | 31 | def data_dictionary show_indexes SHOW_INDEXES Key_name Key_name 8 1024 7 N 4097 0 45 | 31 | def data_dictionary show_indexes SHOW_INDEXES Key_name Key_name 8 1024 7 N 4097 0 45 |
620 | 32 | def data_dictionary show_indexes SHOW_INDEXES Seq_in_index Seq_in_index 5 21 1 N 36865 0 63 | 32 | def data_dictionary show_indexes SHOW_INDEXES Seq_in_index Seq_in_index 5 21 1 N 36865 0 63 |
621 | 33 | def data_dictionary show_indexes SHOW_INDEXES Column_name Column_name 8 1024 1 N 4097 0 45 | 33 | def data_dictionary show_indexes SHOW_INDEXES Column_name Column_name 8 1024 1 N 4097 0 45 |
622 | @@ -447,7 +447,7 @@ | |||
623 | 447 | show index from t1; | 447 | show index from t1; |
624 | 448 | Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr | 448 | Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr |
625 | 449 | def data_dictionary show_indexes SHOW_INDEXES Table Table 8 1024 2 N 4097 0 45 | 449 | def data_dictionary show_indexes SHOW_INDEXES Table Table 8 1024 2 N 4097 0 45 |
627 | 450 | def data_dictionary show_indexes SHOW_INDEXES Unique Unique 8 1 3 N 4097 0 63 | 450 | def data_dictionary show_indexes SHOW_INDEXES Unique Unique 13 1 1 N 36897 0 63 |
628 | 451 | def data_dictionary show_indexes SHOW_INDEXES Key_name Key_name 8 1024 7 N 4097 0 45 | 451 | def data_dictionary show_indexes SHOW_INDEXES Key_name Key_name 8 1024 7 N 4097 0 45 |
629 | 452 | def data_dictionary show_indexes SHOW_INDEXES Seq_in_index Seq_in_index 5 21 1 N 36865 0 63 | 452 | def data_dictionary show_indexes SHOW_INDEXES Seq_in_index Seq_in_index 5 21 1 N 36865 0 63 |
630 | 453 | def data_dictionary show_indexes SHOW_INDEXES Column_name Column_name 8 1024 6 N 4097 0 45 | 453 | def data_dictionary show_indexes SHOW_INDEXES Column_name Column_name 8 1024 6 N 4097 0 45 |
Nice one :)