~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2009-03-12 16:19:44 UTC
  • mto: This revision was merged to the branch mainline in revision 933.
  • Revision ID: brian@tangent.org-20090312161944-c7nnynwe17gbv4us
Dead code paths (LCOV)

Show diffs side-by-side

added added

removed removed

Lines of Context:
826
826
%token  ULONGLONG_NUM
827
827
%token  UNCOMMITTED_SYM               /* SQL-2003-N */
828
828
%token  UNDEFINED_SYM
829
 
%token  UNDERSCORE_CHARSET
830
829
%token  UNDOFILE_SYM
831
830
%token  UNDO_SYM                      /* FUTURE-USE */
832
831
%token  UNION_SYM                     /* SQL-2003-R */
995
994
%type <charset>
996
995
        collation_name
997
996
        collation_name_or_default
998
 
        UNDERSCORE_CHARSET
999
997
 
1000
998
%type <variable> internal_variable_name
1001
999
 
5304
5302
            tmp= $1;
5305
5303
            $$= new Item_string(tmp.str, tmp.length, cs_con, DERIVATION_COERCIBLE, repertoire);
5306
5304
          }
5307
 
        | UNDERSCORE_CHARSET TEXT_STRING
5308
 
          {
5309
 
            Item_string *str= new Item_string($2.str, $2.length, $1);
5310
 
            str->set_repertoire_from_value();
5311
 
            str->set_cs_specified(true);
5312
 
 
5313
 
            $$= str;
5314
 
          }
5315
5305
        | text_literal TEXT_STRING_literal
5316
5306
          {
5317
5307
            Item_string* item= (Item_string*) $1;
5382
5372
        | TRUE_SYM { $$= new Item_int((char*) "TRUE",1,1); }
5383
5373
        | HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);}
5384
5374
        | BIN_NUM { $$= new Item_bin_string($1.str, $1.length); }
5385
 
        | UNDERSCORE_CHARSET HEX_NUM
5386
 
          {
5387
 
            Item *tmp= new Item_hex_string($2.str, $2.length);
5388
 
            /*
5389
 
              it is OK only emulate fix_fieds, because we need only
5390
 
              value of constant
5391
 
            */
5392
 
            String *str= tmp ?
5393
 
              tmp->quick_fix_field(), tmp->val_str((String*) 0) :
5394
 
              (String*) 0;
5395
 
 
5396
 
            Item_string *item_str=
5397
 
              new Item_string(NULL, /* name will be set in select_item */
5398
 
                              str ? str->ptr() : "",
5399
 
                              str ? str->length() : 0,
5400
 
                              $1);
5401
 
            if (!item_str ||
5402
 
                !item_str->check_well_formed_result(&item_str->str_value, true))
5403
 
            {
5404
 
              DRIZZLE_YYABORT;
5405
 
            }
5406
 
 
5407
 
            item_str->set_repertoire_from_value();
5408
 
            item_str->set_cs_specified(true);
5409
 
 
5410
 
            $$= item_str;
5411
 
          }
5412
 
        | UNDERSCORE_CHARSET BIN_NUM
5413
 
          {
5414
 
            Item *tmp= new Item_bin_string($2.str, $2.length);
5415
 
            /*
5416
 
              it is OK only emulate fix_fieds, because we need only
5417
 
              value of constant
5418
 
            */
5419
 
            String *str= tmp ?
5420
 
              tmp->quick_fix_field(), tmp->val_str((String*) 0) :
5421
 
              (String*) 0;
5422
 
 
5423
 
            Item_string *item_str=
5424
 
              new Item_string(NULL, /* name will be set in select_item */
5425
 
                              str ? str->ptr() : "",
5426
 
                              str ? str->length() : 0,
5427
 
                              $1);
5428
 
            if (!item_str ||
5429
 
                !item_str->check_well_formed_result(&item_str->str_value, true))
5430
 
            {
5431
 
              DRIZZLE_YYABORT;
5432
 
            }
5433
 
 
5434
 
            item_str->set_cs_specified(true);
5435
 
 
5436
 
            $$= item_str;
5437
 
          }
5438
5375
        | DATE_SYM text_literal { $$ = $2; }
5439
5376
        | TIMESTAMP text_literal { $$ = $2; }
5440
5377
        ;