~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_func.h

Merged vcol stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
  void fix_length_and_dec();
342
342
  bool fix_fields(THD *thd, Item **ref);
343
343
  int64_t val_int() { assert(fixed == 1); return value; }
 
344
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
345
  { return true; }
344
346
};
345
347
 
346
348
 
396
398
public:
397
399
  Item_func_additive_op(Item *a,Item *b) :Item_num_op(a,b) {}
398
400
  void result_precision();
 
401
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
402
  { return false; }
399
403
};
400
404
 
401
405
 
430
434
  double real_op();
431
435
  my_decimal *decimal_op(my_decimal *);
432
436
  void result_precision();
 
437
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
438
  { return false; }
433
439
};
434
440
 
435
441
 
460
466
  {
461
467
    print_op(str, query_type);
462
468
  }
463
 
 
 
469
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
470
  { return false; }
464
471
};
465
472
 
466
473
 
474
481
  const char *func_name() const { return "%"; }
475
482
  void result_precision();
476
483
  void fix_length_and_dec();
 
484
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
485
  { return false; }
477
486
};
478
487
 
479
488
 
489
498
  void fix_length_and_dec();
490
499
  void fix_num_length_and_dec();
491
500
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
 
501
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
502
  { return false; }
492
503
};
493
504
 
494
505
 
501
512
  my_decimal *decimal_op(my_decimal *);
502
513
  const char *func_name() const { return "abs"; }
503
514
  void fix_length_and_dec();
 
515
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
516
  { return false; }
504
517
};
505
518
 
506
519
// A class to handle logarithmic and trigonometric functions
655
668
  int64_t int_op();
656
669
  double real_op();
657
670
  my_decimal *decimal_op(my_decimal *);
 
671
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
672
  { return false; }
658
673
};
659
674
 
660
675
 
666
681
  int64_t int_op();
667
682
  double real_op();
668
683
  my_decimal *decimal_op(my_decimal *);
 
684
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
685
  { return false; }
669
686
};
670
687
 
671
688
/* This handles round and truncate */
695
712
  bool const_item() const { return 0; }
696
713
  void update_used_tables();
697
714
  bool fix_fields(THD *thd, Item **ref);
 
715
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
716
  { return true; }
698
717
private:
699
718
  void seed_random (Item * val);  
700
719
};
977
996
      max_length= args[0]->max_length;
978
997
  }
979
998
  bool fix_fields(THD *thd, Item **ref);
 
999
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1000
  { return true; }
980
1001
};
981
1002
 
982
1003
 
990
1011
  const char *func_name() const { return "benchmark"; }
991
1012
  void fix_length_and_dec() { max_length=1; maybe_null=0; }
992
1013
  virtual void print(String *str, enum_query_type query_type);
 
1014
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1015
  { return true; }
993
1016
};
994
1017
 
995
1018
/* replication functions */
1003
1026
  int64_t val_int();
1004
1027
  const char *func_name() const { return "master_pos_wait"; }
1005
1028
  void fix_length_and_dec() { max_length=21; maybe_null=1;}
 
1029
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1030
  { return true; }
1006
1031
};
1007
1032
 
1008
1033
 
1060
1085
  }
1061
1086
  void save_org_in_field(Field *field) { (void)save_in_field(field, 1, 0); }
1062
1087
  bool register_field_in_read_map(unsigned char *arg);
 
1088
  bool register_field_in_bitmap(unsigned char *arg);
1063
1089
};
1064
1090
 
1065
1091
 
1171
1197
  int64_t val_int();
1172
1198
  const char *func_name() const { return "is_free_lock"; }
1173
1199
  void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1;}
 
1200
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1201
  { return true; }
1174
1202
};
1175
1203
 
1176
1204
class Item_func_is_used_lock :public Item_int_func
1181
1209
  int64_t val_int();
1182
1210
  const char *func_name() const { return "is_used_lock"; }
1183
1211
  void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1;}
 
1212
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1213
  { return true; }
1184
1214
};
1185
1215
 
1186
1216
/* For type casts */
1200
1230
  int64_t val_int();
1201
1231
  const char *func_name() const { return "row_count"; }
1202
1232
  void fix_length_and_dec() { decimals= 0; maybe_null=0; }
 
1233
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1234
  { return true; }
1203
1235
};
1204
1236
 
1205
1237
 
1218
1250
  int64_t val_int();
1219
1251
  const char *func_name() const { return "found_rows"; }
1220
1252
  void fix_length_and_dec() { decimals= 0; maybe_null=0; }
 
1253
  bool check_vcol_func_processor(unsigned char *int_arg __attribute__((unused)))
 
1254
  { return true; }
1221
1255
};
1222
1256
 
1223
1257
#endif /* DRIZZLE_SERVER_ITEM_FUNC_H */