~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.cc

  • Committer: Lee Bieber
  • Date: 2011-02-25 23:59:53 UTC
  • mfrom: (2202.1.2 build)
  • Revision ID: kalebral@gmail.com-20110225235953-b3gz1ctk69b04n63
Merge Monty - fixes sqla/python mysqldb date processing
Merge Olaf - refactor include files

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "mysql_protocol.h"
33
33
#include "mysql_password.h"
34
34
#include "options.h"
35
 
 
36
35
#include <drizzled/identifier.h>
37
 
 
 
36
#include <drizzled/plugin/function.h>
38
37
#include <libdrizzle/constants.h>
39
38
 
40
39
#define PROTOCOL_VERSION 10
525
524
      switch (field.type)
526
525
      {
527
526
      case DRIZZLE_TYPE_LONG:
528
 
        pos[6]= 3;
 
527
        pos[6]= DRIZZLE_COLUMN_TYPE_LONG;
529
528
        break;
530
529
 
531
530
      case DRIZZLE_TYPE_DOUBLE:
532
 
        pos[6]= 5;
 
531
        pos[6]= DRIZZLE_COLUMN_TYPE_DOUBLE;
533
532
        break;
534
533
 
535
534
      case DRIZZLE_TYPE_NULL:
536
 
        pos[6]= 6;
 
535
        pos[6]= DRIZZLE_COLUMN_TYPE_NULL;
537
536
        break;
538
537
 
539
538
      case DRIZZLE_TYPE_TIMESTAMP:
540
 
        pos[6]= 7;
 
539
        pos[6]= DRIZZLE_COLUMN_TYPE_TIMESTAMP;
541
540
        break;
542
541
 
543
542
      case DRIZZLE_TYPE_LONGLONG:
544
 
        pos[6]= 8;
 
543
        pos[6]= DRIZZLE_COLUMN_TYPE_LONGLONG;
545
544
        break;
546
545
 
547
546
      case DRIZZLE_TYPE_DATETIME:
548
 
        pos[6]= 12;
 
547
        pos[6]= DRIZZLE_COLUMN_TYPE_DATETIME;
549
548
        break;
550
549
 
551
550
      case DRIZZLE_TYPE_TIME:
552
 
        pos[6]= 13;
 
551
        pos[6]= DRIZZLE_COLUMN_TYPE_TIME;
553
552
        break;
554
553
 
555
554
      case DRIZZLE_TYPE_DATE:
556
 
        pos[6]= 14;
 
555
        pos[6]= DRIZZLE_COLUMN_TYPE_DATE;
557
556
        break;
558
557
 
559
558
      case DRIZZLE_TYPE_VARCHAR:
560
 
        pos[6]= 15;
 
559
        pos[6]= DRIZZLE_COLUMN_TYPE_VARCHAR;
561
560
        break;
562
561
 
563
562
      case DRIZZLE_TYPE_MICROTIME:
564
 
        pos[6]= 15;
 
563
        pos[6]= DRIZZLE_COLUMN_TYPE_VARCHAR;
565
564
        break;
566
565
 
567
566
      case DRIZZLE_TYPE_UUID:
568
 
        pos[6]= 15;
 
567
        pos[6]= DRIZZLE_COLUMN_TYPE_VARCHAR;
569
568
        break;
570
569
 
571
570
      case DRIZZLE_TYPE_BOOLEAN:
573
572
        break;
574
573
 
575
574
      case DRIZZLE_TYPE_DECIMAL:
576
 
        pos[6]= (char)246;
 
575
        pos[6]= (char)DRIZZLE_COLUMN_TYPE_NEWDECIMAL;
577
576
        break;
578
577
 
579
578
      case DRIZZLE_TYPE_ENUM:
580
 
        pos[6]= (char)247;
 
579
        pos[6]= (char)DRIZZLE_COLUMN_TYPE_ENUM;
581
580
        break;
582
581
 
583
582
      case DRIZZLE_TYPE_BLOB:
584
 
        pos[6]= (char)252;
 
583
        pos[6]= (char)DRIZZLE_COLUMN_TYPE_BLOB;
585
584
        break;
586
585
      }
587
586
    }