84
84
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
86
86
DRIZZLE_TYPE_VARCHAR,
87
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
88
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
89
89
//DRIZZLE_TYPE_STRING
90
90
DRIZZLE_TYPE_STRING
111
111
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
112
112
//DRIZZLE_TYPE_SET
113
113
DRIZZLE_TYPE_VARCHAR,
114
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
115
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
116
116
//DRIZZLE_TYPE_STRING
117
117
DRIZZLE_TYPE_STRING
138
138
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
139
139
//DRIZZLE_TYPE_SET
140
140
DRIZZLE_TYPE_VARCHAR,
141
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
142
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
143
143
//DRIZZLE_TYPE_STRING
144
144
DRIZZLE_TYPE_STRING
165
165
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
166
166
//DRIZZLE_TYPE_SET
167
167
DRIZZLE_TYPE_VARCHAR,
168
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
169
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
170
170
//DRIZZLE_TYPE_STRING
171
171
DRIZZLE_TYPE_STRING
192
192
DRIZZLE_TYPE_DOUBLE, DRIZZLE_TYPE_VARCHAR,
193
193
//DRIZZLE_TYPE_SET
194
194
DRIZZLE_TYPE_VARCHAR,
195
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
196
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
197
197
//DRIZZLE_TYPE_STRING
198
198
DRIZZLE_TYPE_STRING
219
219
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_ENUM,
220
220
//DRIZZLE_TYPE_SET
221
221
DRIZZLE_TYPE_SET,
222
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
223
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
224
224
//DRIZZLE_TYPE_STRING
225
225
DRIZZLE_TYPE_STRING
246
246
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
247
247
//DRIZZLE_TYPE_SET
248
248
DRIZZLE_TYPE_VARCHAR,
249
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
250
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
251
251
//DRIZZLE_TYPE_STRING
252
252
DRIZZLE_TYPE_STRING
273
273
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
274
274
//DRIZZLE_TYPE_SET
275
275
DRIZZLE_TYPE_VARCHAR,
276
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
277
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
278
278
//DRIZZLE_TYPE_STRING
279
279
DRIZZLE_TYPE_STRING
300
300
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
301
301
//DRIZZLE_TYPE_SET
302
302
DRIZZLE_TYPE_VARCHAR,
303
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
304
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
305
305
//DRIZZLE_TYPE_STRING
306
306
DRIZZLE_TYPE_STRING
327
327
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
328
328
//DRIZZLE_TYPE_SET
329
329
DRIZZLE_TYPE_VARCHAR,
330
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
331
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
332
332
//DRIZZLE_TYPE_STRING
333
333
DRIZZLE_TYPE_STRING
354
354
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
355
355
//DRIZZLE_TYPE_SET
356
356
DRIZZLE_TYPE_VARCHAR,
357
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
358
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
359
359
//DRIZZLE_TYPE_STRING
360
360
DRIZZLE_TYPE_STRING
381
381
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
382
382
//DRIZZLE_TYPE_SET
383
383
DRIZZLE_TYPE_VARCHAR,
384
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
385
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
386
386
//DRIZZLE_TYPE_STRING
387
387
DRIZZLE_TYPE_STRING
408
408
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
409
409
//DRIZZLE_TYPE_SET
410
410
DRIZZLE_TYPE_VARCHAR,
411
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
412
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
413
413
//DRIZZLE_TYPE_STRING
414
414
DRIZZLE_TYPE_VARCHAR
435
435
DRIZZLE_TYPE_NEWDECIMAL, DRIZZLE_TYPE_VARCHAR,
436
436
//DRIZZLE_TYPE_SET
437
437
DRIZZLE_TYPE_VARCHAR,
438
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
439
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
440
440
//DRIZZLE_TYPE_STRING
441
441
DRIZZLE_TYPE_STRING
462
462
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
463
463
//DRIZZLE_TYPE_SET
464
464
DRIZZLE_TYPE_VARCHAR,
465
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
466
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
467
467
//DRIZZLE_TYPE_STRING
468
468
DRIZZLE_TYPE_STRING
489
489
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
490
490
//DRIZZLE_TYPE_SET
491
491
DRIZZLE_TYPE_VARCHAR,
492
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
493
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
494
494
//DRIZZLE_TYPE_STRING
495
495
DRIZZLE_TYPE_STRING
516
516
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_BLOB,
517
517
//DRIZZLE_TYPE_SET
518
518
DRIZZLE_TYPE_BLOB,
519
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
520
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_BLOB,
521
521
//DRIZZLE_TYPE_STRING
522
522
DRIZZLE_TYPE_BLOB
524
/* DRIZZLE_TYPE_VAR_STRING -> */
526
//DRIZZLE_TYPE_DECIMAL DRIZZLE_TYPE_TINY
527
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
528
//DRIZZLE_TYPE_SHORT DRIZZLE_TYPE_LONG
529
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
530
//DRIZZLE_TYPE_DOUBLE
531
DRIZZLE_TYPE_VARCHAR,
532
//DRIZZLE_TYPE_NULL DRIZZLE_TYPE_TIMESTAMP
533
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
534
//DRIZZLE_TYPE_LONGLONG
535
DRIZZLE_TYPE_VARCHAR,
536
//DRIZZLE_TYPE_DATE DRIZZLE_TYPE_TIME
537
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
538
//DRIZZLE_TYPE_DATETIME
539
DRIZZLE_TYPE_VARCHAR,
540
//DRIZZLE_TYPE_NEWDATE DRIZZLE_TYPE_VARCHAR
541
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
542
//DRIZZLE_TYPE_NEWDECIMAL DRIZZLE_TYPE_ENUM
543
DRIZZLE_TYPE_VARCHAR, DRIZZLE_TYPE_VARCHAR,
545
DRIZZLE_TYPE_VARCHAR,
546
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
547
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
548
//DRIZZLE_TYPE_STRING
551
524
/* DRIZZLE_TYPE_STRING -> */
553
526
//DRIZZLE_TYPE_DECIMAL DRIZZLE_TYPE_TINY
570
543
DRIZZLE_TYPE_STRING, DRIZZLE_TYPE_STRING,
571
544
//DRIZZLE_TYPE_SET
572
545
DRIZZLE_TYPE_STRING,
573
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
574
DRIZZLE_TYPE_BLOB, DRIZZLE_TYPE_VARCHAR,
575
548
//DRIZZLE_TYPE_STRING
576
549
DRIZZLE_TYPE_STRING
619
592
DECIMAL_RESULT, STRING_RESULT,
620
593
//DRIZZLE_TYPE_SET
622
//DRIZZLE_TYPE_BLOB DRIZZLE_TYPE_VAR_STRING
623
STRING_RESULT, STRING_RESULT,
624
597
//DRIZZLE_TYPE_STRING
2465
2436
length= 1; /* See comment for DRIZZLE_TYPE_SET above. */
2468
case DRIZZLE_TYPE_VAR_STRING:
2469
assert(0); /* Impossible, we killed it */
2472
2440
/* Remember the value of length */
2473
2441
char_length= length;
2480
2448
fld_type != DRIZZLE_TYPE_STRING &&
2481
2449
fld_type != DRIZZLE_TYPE_VARCHAR)))
2483
my_error((fld_type == DRIZZLE_TYPE_VAR_STRING ||
2484
fld_type == DRIZZLE_TYPE_VARCHAR ||
2451
my_error((fld_type == DRIZZLE_TYPE_VARCHAR ||
2485
2452
fld_type == DRIZZLE_TYPE_STRING) ? ER_TOO_BIG_FIELDLENGTH :
2486
2453
ER_TOO_BIG_DISPLAYWIDTH,
2516
2483
uint32_t calc_pack_length(enum_field_types type,uint32_t length)
2518
2485
switch (type) {
2519
case DRIZZLE_TYPE_VAR_STRING:
2520
2486
case DRIZZLE_TYPE_STRING:
2521
2487
case DRIZZLE_TYPE_VARCHAR: return (length + (length < 256 ? 1: 2));
2522
2488
case DRIZZLE_TYPE_TINY : return 1;
2588
2554
if (!f_is_packed(pack_flag))
2590
if (field_type == DRIZZLE_TYPE_STRING ||
2591
field_type == DRIZZLE_TYPE_VAR_STRING)
2556
if (field_type == DRIZZLE_TYPE_STRING)
2592
2557
return new Field_string(ptr,field_length,null_pos,null_bit,
2593
2558
unireg_check, field_name,
2594
2559
field_charset);
2710
2675
case DRIZZLE_TYPE_STRING:
2711
2676
/* Change CHAR -> VARCHAR if dynamic record length */
2712
if (old_field->type() == DRIZZLE_TYPE_VAR_STRING)
2713
sql_type= DRIZZLE_TYPE_VARCHAR;
2716
2677
case DRIZZLE_TYPE_ENUM:
2717
2678
case DRIZZLE_TYPE_SET:
2718
2679
case DRIZZLE_TYPE_VARCHAR:
2719
case DRIZZLE_TYPE_VAR_STRING:
2720
2680
/* This is corrected in create_length_to_internal_length */
2721
2681
length= (length+charset->mbmaxlen-1) / charset->mbmaxlen;