~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/sql_plugin.cc

  • Committer: Monty Taylor
  • Date: 2008-07-04 13:45:27 UTC
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: monty@inaugust.com-20080704134527-ogxwoleklmc75099
Updated everything that needs updating to compile with -std=gnu99 -pedantic 

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
}
246
246
 
247
247
 
248
 
static int item_val_int(struct st_mysql_value *value, long long *buf)
 
248
static int item_val_int(struct st_mysql_value *value, int64_t *buf)
249
249
{
250
250
  Item *item= ((st_item_value_holder*)value)->item;
251
251
  *buf= item->val_int();
1561
1561
  char buff[STRING_BUFFER_USUAL_SIZE];
1562
1562
  const char *strvalue= "NULL", *str;
1563
1563
  int result, length;
1564
 
  long long tmp;
 
1564
  int64_t tmp;
1565
1565
 
1566
1566
  if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING)
1567
1567
  {
1598
1598
                          void *save, st_mysql_value *value)
1599
1599
{
1600
1600
  my_bool fixed;
1601
 
  long long tmp;
 
1601
  int64_t tmp;
1602
1602
  struct my_option options;
1603
1603
  value->val_int(value, &tmp);
1604
1604
  plugin_opt_set_limits(&options, var);
1618
1618
                          void *save, st_mysql_value *value)
1619
1619
{
1620
1620
  my_bool fixed;
1621
 
  long long tmp;
 
1621
  int64_t tmp;
1622
1622
  struct my_option options;
1623
1623
  value->val_int(value, &tmp);
1624
1624
  plugin_opt_set_limits(&options, var);
1638
1638
                               void *save, st_mysql_value *value)
1639
1639
{
1640
1640
  my_bool fixed;
1641
 
  long long tmp;
 
1641
  int64_t tmp;
1642
1642
  struct my_option options;
1643
1643
  value->val_int(value, &tmp);
1644
1644
  plugin_opt_set_limits(&options, var);
1674
1674
  char buff[STRING_BUFFER_USUAL_SIZE];
1675
1675
  const char *strvalue= "NULL", *str;
1676
1676
  TYPELIB *typelib;
1677
 
  long long tmp;
 
1677
  int64_t tmp;
1678
1678
  long result;
1679
1679
  int length;
1680
1680
 
1746
1746
  }
1747
1747
  else
1748
1748
  {
1749
 
    if (value->val_int(value, (long long *)&result))
 
1749
    if (value->val_int(value, (int64_t *)&result))
1750
1750
      goto err;
1751
1751
    if (unlikely((result >= (ULL(1) << typelib->count)) &&
1752
1752
                 (typelib->count < sizeof(long)*8)))