mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
remove ULL() and LL(), because they're totally unnecessary
and sometimes harmful (used with expressions)
This commit is contained in:
parent
ef5241ae05
commit
4ec6fe10e5
48 changed files with 248 additions and 256 deletions
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -60,31 +61,31 @@ extern "C" {
|
|||
sets all high keys.
|
||||
*/
|
||||
#define MARIA_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
|
||||
#define MARIA_KEYMAP_HIGH_MASK (ULL(1) << (MARIA_KEYMAP_BITS - 1))
|
||||
#define MARIA_KEYMAP_HIGH_MASK (1ULL << (MARIA_KEYMAP_BITS - 1))
|
||||
#define maria_get_mask_all_keys_active(_keys_) \
|
||||
(((_keys_) < MARIA_KEYMAP_BITS) ? \
|
||||
((ULL(1) << (_keys_)) - ULL(1)) : \
|
||||
(~ ULL(0)))
|
||||
((1ULL << (_keys_)) - 1ULL) : \
|
||||
(~ 0ULL))
|
||||
#if MARIA_MAX_KEY > MARIA_KEYMAP_BITS
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
(((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_))) : \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MARIA_KEYMAP_HIGH_MASK))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
(ULL(1) << (_keyno_)) : \
|
||||
(1ULL << (_keyno_)) : \
|
||||
MARIA_KEYMAP_HIGH_MASK)
|
||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (((_keyno_) < MARIA_KEYMAP_BITS) ? \
|
||||
(~ (ULL(1) << (_keyno_))) : \
|
||||
(~ (ULL(0))) /*ignore*/ )
|
||||
(~ (1ULL << (_keyno_))) : \
|
||||
(~ (0ULL)) /*ignore*/ )
|
||||
#else
|
||||
#define maria_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_)))
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define maria_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (ULL(1) << (_keyno_))
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define maria_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (~ (ULL(1) << (_keyno_)))
|
||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||
#endif
|
||||
#define maria_is_any_key_active(_keymap_) \
|
||||
test((_keymap_))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1006,25 +1007,8 @@ typedef struct st_mysql_lex_string LEX_STRING;
|
|||
typedef ulong myf; /* Type of MyFlags in my_funcs */
|
||||
typedef char my_bool; /* Small bool */
|
||||
|
||||
/* Macros for converting *constants* to the right type */
|
||||
#define MYF(v) (myf) (v)
|
||||
|
||||
#ifndef LL
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define LL(A) A ## LL
|
||||
#else
|
||||
#define LL(A) A ## L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ULL
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define ULL(A) A ## ULL
|
||||
#else
|
||||
#define ULL(A) A ## UL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
Defines to make it possible to prioritize register assignments. No
|
||||
longer that important with modern compilers.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -57,35 +58,35 @@ extern "C" {
|
|||
sets all high keys.
|
||||
*/
|
||||
#define MI_KEYMAP_BITS (8 * SIZEOF_LONG_LONG)
|
||||
#define MI_KEYMAP_HIGH_MASK (ULL(1) << (MI_KEYMAP_BITS - 1))
|
||||
#define MI_KEYMAP_HIGH_MASK (1ULL << (MI_KEYMAP_BITS - 1))
|
||||
#define mi_get_mask_all_keys_active(_keys_) \
|
||||
(((_keys_) < MI_KEYMAP_BITS) ? \
|
||||
((ULL(1) << (_keys_)) - ULL(1)) : \
|
||||
(~ ULL(0)))
|
||||
((1ULL << (_keys_)) - 1ULL) : \
|
||||
(~ 0ULL))
|
||||
|
||||
#if MI_MAX_KEY > MI_KEYMAP_BITS
|
||||
|
||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||
(((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_))) : \
|
||||
test((_keymap_) & (1ULL << (_keyno_))) : \
|
||||
test((_keymap_) & MI_KEYMAP_HIGH_MASK))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
(ULL(1) << (_keyno_)) : \
|
||||
(1ULL << (_keyno_)) : \
|
||||
MI_KEYMAP_HIGH_MASK)
|
||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (((_keyno_) < MI_KEYMAP_BITS) ? \
|
||||
(~ (ULL(1) << (_keyno_))) : \
|
||||
(~ (ULL(0))) /*ignore*/ )
|
||||
(~ (1ULL << (_keyno_))) : \
|
||||
(~ (0ULL)) /*ignore*/ )
|
||||
|
||||
#else
|
||||
|
||||
#define mi_is_key_active(_keymap_,_keyno_) \
|
||||
test((_keymap_) & (ULL(1) << (_keyno_)))
|
||||
test((_keymap_) & (1ULL << (_keyno_)))
|
||||
#define mi_set_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)|= (ULL(1) << (_keyno_))
|
||||
(_keymap_)|= (1ULL << (_keyno_))
|
||||
#define mi_clear_key_active(_keymap_,_keyno_) \
|
||||
(_keymap_)&= (~ (ULL(1) << (_keyno_)))
|
||||
(_keymap_)&= (~ (1ULL << (_keyno_)))
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011,2012 Monty Program Ab;
|
||||
/* Copyright (c) 2011,2013 Monty Program Ab;
|
||||
Copyright (c) 2011,2012 Oleksandr Byelkin
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -866,7 +866,7 @@ dynamic_column_uint_read(DYNAMIC_COLUMN_VALUE *store_it_here,
|
|||
static size_t dynamic_column_sint_bytes(longlong val)
|
||||
{
|
||||
return dynamic_column_uint_bytes((val << 1) ^
|
||||
(val < 0 ? ULL(0xffffffffffffffff) : 0));
|
||||
(val < 0 ? 0xffffffffffffffffull : 0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -884,7 +884,7 @@ dynamic_column_sint_store(DYNAMIC_COLUMN *str, longlong val)
|
|||
{
|
||||
return dynamic_column_uint_store(str,
|
||||
(val << 1) ^
|
||||
(val < 0 ? ULL(0xffffffffffffffff) : 0));
|
||||
(val < 0 ? 0xffffffffffffffffULL : 0));
|
||||
}
|
||||
|
||||
|
||||
|
@ -906,7 +906,7 @@ dynamic_column_sint_read(DYNAMIC_COLUMN_VALUE *store_it_here,
|
|||
dynamic_column_uint_read(store_it_here, data, length);
|
||||
val= store_it_here->x.ulong_value;
|
||||
if (val & 1)
|
||||
val= (val >> 1) ^ ULL(0xffffffffffffffff);
|
||||
val= (val >> 1) ^ 0xffffffffffffffffULL;
|
||||
else
|
||||
val>>= 1;
|
||||
store_it_here->x.long_value= (longlong) val;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -218,7 +219,7 @@ my_ulonglong find_typeset(char *x, TYPELIB *lib, int *err)
|
|||
x++;
|
||||
if ((find= find_type(i, lib, FIND_TYPE_COMMA_TERM) - 1) < 0)
|
||||
DBUG_RETURN(0);
|
||||
result|= (ULL(1) << find);
|
||||
result|= (1ULL << find);
|
||||
}
|
||||
*err= 0;
|
||||
DBUG_RETURN(result);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
Copyright (c) 2011, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1068,7 +1069,7 @@ int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex)
|
|||
ret= WT_OK;
|
||||
rc_unlock(rc);
|
||||
|
||||
end_wait_time= starttime.val *1000 + (*thd->timeout_short)*ULL(1000000);
|
||||
end_wait_time= starttime.val *1000 + (*thd->timeout_short)*1000000ULL;
|
||||
set_timespec_time_nsec(timeout, end_wait_time);
|
||||
if (ret == WT_TIMEOUT && !thd->killed)
|
||||
ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout);
|
||||
|
@ -1081,7 +1082,7 @@ int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex)
|
|||
ret= WT_DEADLOCK;
|
||||
else if (*thd->timeout_long > *thd->timeout_short)
|
||||
{
|
||||
end_wait_time= starttime.val *1000 + (*thd->timeout_long)*ULL(1000000);
|
||||
end_wait_time= starttime.val *1000 + (*thd->timeout_long)*1000000ULL;
|
||||
set_timespec_time_nsec(timeout, end_wait_time);
|
||||
if (!thd->killed)
|
||||
ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2004, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,10 +25,10 @@
|
|||
ulonglong log_10_int[20]=
|
||||
{
|
||||
1, 10, 100, 1000, 10000UL, 100000UL, 1000000UL, 10000000UL,
|
||||
ULL(100000000), ULL(1000000000), ULL(10000000000), ULL(100000000000),
|
||||
ULL(1000000000000), ULL(10000000000000), ULL(100000000000000),
|
||||
ULL(1000000000000000), ULL(10000000000000000), ULL(100000000000000000),
|
||||
ULL(1000000000000000000), ULL(10000000000000000000)
|
||||
100000000ULL, 1000000000ULL, 10000000000ULL, 100000000000ULL,
|
||||
1000000000000ULL, 10000000000000ULL, 100000000000000ULL,
|
||||
1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL,
|
||||
1000000000000000000ULL, 10000000000000000000ULL
|
||||
};
|
||||
|
||||
|
||||
|
@ -1170,19 +1171,19 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
|
|||
|
||||
time_res->time_type=MYSQL_TIMESTAMP_DATETIME;
|
||||
|
||||
if (nr <= (YY_PART_YEAR-1)*LL(10000000000)+LL(1231235959))
|
||||
if (nr <= (YY_PART_YEAR-1)*10000000000LL+1231235959LL)
|
||||
{
|
||||
nr= nr+LL(20000000000000); /* YYMMDDHHMMSS, 2000-2069 */
|
||||
nr= nr+20000000000000LL; /* YYMMDDHHMMSS, 2000-2069 */
|
||||
goto ok;
|
||||
}
|
||||
if (nr < YY_PART_YEAR*LL(10000000000)+ LL(101000000))
|
||||
if (nr < YY_PART_YEAR*10000000000LL+ 101000000LL)
|
||||
goto err;
|
||||
if (nr <= LL(991231235959))
|
||||
nr= nr+LL(19000000000000); /* YYMMDDHHMMSS, 1970-1999 */
|
||||
if (nr <= 991231235959LL)
|
||||
nr= nr+19000000000000LL; /* YYMMDDHHMMSS, 1970-1999 */
|
||||
|
||||
ok:
|
||||
part1=(long) (nr/LL(1000000));
|
||||
part2=(long) (nr - (longlong) part1*LL(1000000));
|
||||
part1=(long) (nr/1000000LL);
|
||||
part2=(long) (nr - (longlong) part1*1000000LL);
|
||||
time_res->year= (int) (part1/10000L); part1%=10000L;
|
||||
time_res->month= (int) part1 / 100;
|
||||
time_res->day= (int) part1 % 100;
|
||||
|
@ -1202,7 +1203,7 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
|
|||
/* Don't want to have was_cut get set if NO_ZERO_DATE was violated. */
|
||||
if (nr || !(flags & TIME_NO_ZERO_DATE))
|
||||
*was_cut= 1;
|
||||
return LL(-1);
|
||||
return -1;
|
||||
|
||||
err:
|
||||
{
|
||||
|
@ -1212,7 +1213,7 @@ longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res,
|
|||
time_res->time_type= save; /* Restore range */
|
||||
*was_cut= 1; /* Found invalid date */
|
||||
}
|
||||
return LL(-1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1277,7 +1278,7 @@ ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *my_time)
|
|||
{
|
||||
return ((ulonglong) (my_time->year * 10000UL +
|
||||
my_time->month * 100UL +
|
||||
my_time->day) * ULL(1000000) +
|
||||
my_time->day) * 1000000ULL +
|
||||
(ulonglong) (my_time->hour * 10000UL +
|
||||
my_time->minute * 100UL +
|
||||
my_time->second));
|
||||
|
@ -1338,7 +1339,7 @@ ulonglong TIME_to_ulonglong(const MYSQL_TIME *my_time)
|
|||
return TIME_to_ulonglong_time(my_time);
|
||||
case MYSQL_TIMESTAMP_NONE:
|
||||
case MYSQL_TIMESTAMP_ERROR:
|
||||
return ULL(0);
|
||||
return 0;
|
||||
default:
|
||||
DBUG_ASSERT(0);
|
||||
}
|
||||
|
|
|
@ -96,19 +96,19 @@ my_ulonglong net_field_length_ll(uchar **packet)
|
|||
|
||||
uchar *net_store_length(uchar *packet, ulonglong length)
|
||||
{
|
||||
if (length < (ulonglong) LL(251))
|
||||
if (length < (ulonglong) 251LL)
|
||||
{
|
||||
*packet=(uchar) length;
|
||||
return packet+1;
|
||||
}
|
||||
/* 251 is reserved for NULL */
|
||||
if (length < (ulonglong) LL(65536))
|
||||
if (length < (ulonglong) 65536LL)
|
||||
{
|
||||
*packet++=252;
|
||||
int2store(packet,(uint) length);
|
||||
return packet+2;
|
||||
}
|
||||
if (length < (ulonglong) LL(16777216))
|
||||
if (length < (ulonglong) 16777216LL)
|
||||
{
|
||||
*packet++=253;
|
||||
int3store(packet,(ulong) length);
|
||||
|
|
18
sql/field.cc
18
sql/field.cc
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2011, Monty Program Ab
|
||||
Copyright (c) 2008, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -68,7 +68,7 @@ const char field_separator=',';
|
|||
#define LONGLONG_TO_STRING_CONVERSION_BUFFER_SIZE 128
|
||||
#define DECIMAL_TO_STRING_CONVERSION_BUFFER_SIZE 128
|
||||
#define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \
|
||||
((ulong) ((LL(1) << min(arg, 4) * 8) - LL(1)))
|
||||
((ulong) ((1LL << min(arg, 4) * 8) - 1))
|
||||
|
||||
#define ASSERT_COLUMN_MARKED_FOR_READ DBUG_ASSERT(!table || (!table->read_set || bitmap_is_set(table->read_set, field_index)))
|
||||
#define ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED DBUG_ASSERT(is_stat_field || !table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || bitmap_is_set(table->vcol_set, field_index)))
|
||||
|
@ -3643,7 +3643,7 @@ int Field_long::store(longlong nr, bool unsigned_val)
|
|||
res=0;
|
||||
error= 1;
|
||||
}
|
||||
else if ((ulonglong) nr >= (LL(1) << 32))
|
||||
else if ((ulonglong) nr >= (1LL << 32))
|
||||
{
|
||||
res=(int32) (uint32) ~0L;
|
||||
error= 1;
|
||||
|
@ -4577,7 +4577,7 @@ int Field_timestamp::store(longlong nr, bool unsigned_val)
|
|||
longlong tmp= number_to_datetime(nr, 0, &l_time, (thd->variables.sql_mode &
|
||||
MODE_NO_ZERO_DATE) |
|
||||
MODE_NO_ZERO_IN_DATE, &error);
|
||||
return store_TIME_with_warning(thd, &l_time, &str, error, tmp != LL(-1));
|
||||
return store_TIME_with_warning(thd, &l_time, &str, error, tmp != -1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -5795,8 +5795,8 @@ String *Field_datetime::val_str(String *val_buffer,
|
|||
Avoid problem with slow longlong arithmetic and sprintf
|
||||
*/
|
||||
|
||||
part1=(long) (tmp/LL(1000000));
|
||||
part2=(long) (tmp - (ulonglong) part1*LL(1000000));
|
||||
part1=(long) (tmp/1000000LL);
|
||||
part2=(long) (tmp - (ulonglong) part1*1000000LL);
|
||||
|
||||
pos=(char*) val_buffer->ptr() + MAX_DATETIME_WIDTH;
|
||||
*pos--=0;
|
||||
|
@ -5827,8 +5827,8 @@ bool Field_datetime::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
|
|||
{
|
||||
longlong tmp=Field_datetime::val_int();
|
||||
uint32 part1,part2;
|
||||
part1=(uint32) (tmp/LL(1000000));
|
||||
part2=(uint32) (tmp - (ulonglong) part1*LL(1000000));
|
||||
part1=(uint32) (tmp/1000000LL);
|
||||
part2=(uint32) (tmp - (ulonglong) part1*1000000LL);
|
||||
|
||||
ltime->time_type= MYSQL_TIMESTAMP_DATETIME;
|
||||
ltime->neg= 0;
|
||||
|
@ -7909,7 +7909,7 @@ int Field_set::store(longlong nr, bool unsigned_val)
|
|||
if (sizeof(ulonglong)*8 <= typelib->count)
|
||||
max_nr= ULONGLONG_MAX;
|
||||
else
|
||||
max_nr= (ULL(1) << typelib->count) - 1;
|
||||
max_nr= (1ULL << typelib->count) - 1;
|
||||
|
||||
if ((ulonglong) nr > max_nr)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define HANDLER_INCLUDED
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009-2011 Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -59,9 +59,9 @@
|
|||
|
||||
/* Bits in table_flags() to show what database can do */
|
||||
|
||||
#define HA_NO_TRANSACTIONS (1 << 0) /* Doesn't support transactions */
|
||||
#define HA_PARTIAL_COLUMN_READ (1 << 1) /* read may not return all columns */
|
||||
#define HA_TABLE_SCAN_ON_INDEX (1 << 2) /* No separate data/index file */
|
||||
#define HA_NO_TRANSACTIONS (1ULL << 0) /* Doesn't support transactions */
|
||||
#define HA_PARTIAL_COLUMN_READ (1ULL << 1) /* read may not return all columns */
|
||||
#define HA_TABLE_SCAN_ON_INDEX (1ULL << 2) /* No separate data/index file */
|
||||
/*
|
||||
The following should be set if the following is not true when scanning
|
||||
a table with rnd_next()
|
||||
|
@ -70,37 +70,37 @@
|
|||
If this flag is not set, filesort will do a position() call for each matched
|
||||
row to be able to find the row later.
|
||||
*/
|
||||
#define HA_REC_NOT_IN_SEQ (1 << 3)
|
||||
#define HA_CAN_GEOMETRY (1 << 4)
|
||||
#define HA_REC_NOT_IN_SEQ (1ULL << 3)
|
||||
#define HA_CAN_GEOMETRY (1ULL << 4)
|
||||
/*
|
||||
Reading keys in random order is as fast as reading keys in sort order
|
||||
(Used in records.cc to decide if we should use a record cache and by
|
||||
filesort to decide if we should sort key + data or key + pointer-to-row
|
||||
*/
|
||||
#define HA_FAST_KEY_READ (1 << 5)
|
||||
#define HA_FAST_KEY_READ (1ULL << 5)
|
||||
/*
|
||||
Set the following flag if we on delete should force all key to be read
|
||||
and on update read all keys that changes
|
||||
*/
|
||||
#define HA_REQUIRES_KEY_COLUMNS_FOR_DELETE (1 << 6)
|
||||
#define HA_NULL_IN_KEY (1 << 7) /* One can have keys with NULL */
|
||||
#define HA_DUPLICATE_POS (1 << 8) /* ha_position() gives dup row */
|
||||
#define HA_NO_BLOBS (1 << 9) /* Doesn't support blobs */
|
||||
#define HA_CAN_INDEX_BLOBS (1 << 10)
|
||||
#define HA_AUTO_PART_KEY (1 << 11) /* auto-increment in multi-part key */
|
||||
#define HA_REQUIRE_PRIMARY_KEY (1 << 12) /* .. and can't create a hidden one */
|
||||
#define HA_STATS_RECORDS_IS_EXACT (1 << 13) /* stats.records is exact */
|
||||
#define HA_REQUIRES_KEY_COLUMNS_FOR_DELETE (1ULL << 6)
|
||||
#define HA_NULL_IN_KEY (1ULL << 7) /* One can have keys with NULL */
|
||||
#define HA_DUPLICATE_POS (1ULL << 8) /* ha_position() gives dup row */
|
||||
#define HA_NO_BLOBS (1ULL << 9) /* Doesn't support blobs */
|
||||
#define HA_CAN_INDEX_BLOBS (1ULL << 10)
|
||||
#define HA_AUTO_PART_KEY (1ULL << 11) /* auto-increment in multi-part key */
|
||||
#define HA_REQUIRE_PRIMARY_KEY (1ULL << 12) /* .. and can't create a hidden one */
|
||||
#define HA_STATS_RECORDS_IS_EXACT (1ULL << 13) /* stats.records is exact */
|
||||
/*
|
||||
INSERT_DELAYED only works with handlers that uses MySQL internal table
|
||||
level locks
|
||||
*/
|
||||
#define HA_CAN_INSERT_DELAYED (1 << 14)
|
||||
#define HA_CAN_INSERT_DELAYED (1ULL << 14)
|
||||
/*
|
||||
If we get the primary key columns for free when we do an index read
|
||||
It also implies that we have to retrive the primary key when using
|
||||
position() and rnd_pos().
|
||||
*/
|
||||
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
|
||||
#define HA_PRIMARY_KEY_IN_READ_INDEX (1ULL << 15)
|
||||
/*
|
||||
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
|
||||
uses a primary key given by the record argument.
|
||||
|
@ -108,36 +108,36 @@
|
|||
If not set, the position is returned as the current rows position
|
||||
regardless of what argument is given.
|
||||
*/
|
||||
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
|
||||
#define HA_CAN_RTREEKEYS (1 << 17)
|
||||
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
|
||||
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1ULL << 16)
|
||||
#define HA_CAN_RTREEKEYS (1ULL << 17)
|
||||
#define HA_NOT_DELETE_WITH_CACHE (1ULL << 18)
|
||||
/*
|
||||
The following is we need to a primary key to delete (and update) a row.
|
||||
If there is no primary key, all columns needs to be read on update and delete
|
||||
*/
|
||||
#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE (1 << 19)
|
||||
#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
|
||||
#define HA_CAN_FULLTEXT (1 << 21)
|
||||
#define HA_CAN_SQL_HANDLER (1 << 22)
|
||||
#define HA_NO_AUTO_INCREMENT (1 << 23)
|
||||
#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE (1ULL << 19)
|
||||
#define HA_NO_PREFIX_CHAR_KEYS (1ULL << 20)
|
||||
#define HA_CAN_FULLTEXT (1ULL << 21)
|
||||
#define HA_CAN_SQL_HANDLER (1ULL << 22)
|
||||
#define HA_NO_AUTO_INCREMENT (1ULL << 23)
|
||||
/* Has automatic checksums and uses the old checksum format */
|
||||
#define HA_HAS_OLD_CHECKSUM (1 << 24)
|
||||
#define HA_HAS_OLD_CHECKSUM (1ULL << 24)
|
||||
/* Table data are stored in separate files (for lower_case_table_names) */
|
||||
#define HA_FILE_BASED (1 << 26)
|
||||
#define HA_NO_VARCHAR (1 << 27)
|
||||
#define HA_CAN_BIT_FIELD (1 << 28) /* supports bit fields */
|
||||
#define HA_NEED_READ_RANGE_BUFFER (1 << 29) /* for read_multi_range */
|
||||
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
|
||||
#define HA_NO_COPY_ON_ALTER (LL(1) << 31)
|
||||
#define HA_HAS_RECORDS (LL(1) << 32) /* records() gives exact count*/
|
||||
#define HA_FILE_BASED (1ULL << 26)
|
||||
#define HA_NO_VARCHAR (1ULL << 27)
|
||||
#define HA_CAN_BIT_FIELD (1ULL << 28) /* supports bit fields */
|
||||
#define HA_NEED_READ_RANGE_BUFFER (1ULL << 29) /* for read_multi_range */
|
||||
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1ULL << 30)
|
||||
#define HA_NO_COPY_ON_ALTER (1ULL << 31)
|
||||
#define HA_HAS_RECORDS (1ULL << 32) /* records() gives exact count*/
|
||||
/* Has it's own method of binlog logging */
|
||||
#define HA_HAS_OWN_BINLOGGING (LL(1) << 33)
|
||||
#define HA_HAS_OWN_BINLOGGING (1ULL << 33)
|
||||
/*
|
||||
Engine is capable of row-format and statement-format logging,
|
||||
respectively
|
||||
*/
|
||||
#define HA_BINLOG_ROW_CAPABLE (LL(1) << 34)
|
||||
#define HA_BINLOG_STMT_CAPABLE (LL(1) << 35)
|
||||
#define HA_BINLOG_ROW_CAPABLE (1ULL << 34)
|
||||
#define HA_BINLOG_STMT_CAPABLE (1ULL << 35)
|
||||
/*
|
||||
When a multiple key conflict happens in a REPLACE command mysql
|
||||
expects the conflicts to be reported in the ascending order of
|
||||
|
@ -160,20 +160,20 @@
|
|||
This flag helps the underlying SE to inform the server that the keys are not
|
||||
ordered.
|
||||
*/
|
||||
#define HA_DUPLICATE_KEY_NOT_IN_ORDER (LL(1) << 36)
|
||||
#define HA_DUPLICATE_KEY_NOT_IN_ORDER (1ULL << 36)
|
||||
|
||||
/*
|
||||
Engine supports REPAIR TABLE. Used by CHECK TABLE FOR UPGRADE if an
|
||||
incompatible table is detected. If this flag is set, CHECK TABLE FOR UPGRADE
|
||||
will report ER_TABLE_NEEDS_UPGRADE, otherwise ER_TABLE_NEED_REBUILD.
|
||||
*/
|
||||
#define HA_CAN_REPAIR (LL(1) << 37)
|
||||
#define HA_CAN_REPAIR (1ULL << 37)
|
||||
|
||||
/* Has automatic checksums and uses the new checksum format */
|
||||
#define HA_HAS_NEW_CHECKSUM (LL(1) << 38)
|
||||
#define HA_CAN_VIRTUAL_COLUMNS (LL(1) << 39)
|
||||
#define HA_MRR_CANT_SORT (LL(1) << 40)
|
||||
#define HA_RECORD_MUST_BE_CLEAN_ON_WRITE (LL(1) << 41)
|
||||
#define HA_HAS_NEW_CHECKSUM (1ULL << 38)
|
||||
#define HA_CAN_VIRTUAL_COLUMNS (1ULL << 39)
|
||||
#define HA_MRR_CANT_SORT (1ULL << 40)
|
||||
#define HA_RECORD_MUST_BE_CLEAN_ON_WRITE (1ULL << 41)
|
||||
|
||||
/*
|
||||
Table condition pushdown must be performed regardless of
|
||||
|
@ -186,7 +186,7 @@
|
|||
then the "query=..." condition must be always pushed down into storage
|
||||
engine.
|
||||
*/
|
||||
#define HA_MUST_USE_TABLE_CONDITION_PUSHDOWN (LL(1) << 42)
|
||||
#define HA_MUST_USE_TABLE_CONDITION_PUSHDOWN (1ULL << 42)
|
||||
|
||||
/*
|
||||
Set of all binlog flags. Currently only contain the capabilities
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, Monty Program Ab
|
||||
Copyright (c) 2010, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -4012,8 +4012,8 @@ double Item_copy_string::val_real()
|
|||
longlong Item_copy_string::val_int()
|
||||
{
|
||||
int err;
|
||||
return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(),
|
||||
str_value.length(),10, (char**) 0,
|
||||
return null_value ? 0 : my_strntoll(str_value.charset(),str_value.ptr(),
|
||||
str_value.length(), 10, (char**) 0,
|
||||
&err);
|
||||
}
|
||||
|
||||
|
@ -4183,7 +4183,7 @@ double Item_copy_decimal::val_real()
|
|||
longlong Item_copy_decimal::val_int()
|
||||
{
|
||||
if (null_value)
|
||||
return LL(0);
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
longlong result;
|
||||
|
|
|
@ -3592,7 +3592,7 @@ public:
|
|||
}
|
||||
virtual longlong val_int()
|
||||
{
|
||||
return null_value ? LL(0) : cached_value;
|
||||
return null_value ? 0 : cached_value;
|
||||
}
|
||||
virtual void copy();
|
||||
};
|
||||
|
|
|
@ -2215,7 +2215,7 @@ longlong Item_func_shift_left::val_int()
|
|||
return 0;
|
||||
}
|
||||
null_value=0;
|
||||
return (shift < sizeof(longlong)*8 ? (longlong) res : LL(0));
|
||||
return (shift < sizeof(longlong)*8 ? (longlong) res : 0);
|
||||
}
|
||||
|
||||
longlong Item_func_shift_right::val_int()
|
||||
|
@ -2230,7 +2230,7 @@ longlong Item_func_shift_right::val_int()
|
|||
return 0;
|
||||
}
|
||||
null_value=0;
|
||||
return (shift < sizeof(longlong)*8 ? (longlong) res : LL(0));
|
||||
return (shift < sizeof(longlong)*8 ? (longlong) res : 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3163,7 +3163,7 @@ void Item_func_find_in_set::fix_length_and_dec()
|
|||
find->length(), 0);
|
||||
enum_bit=0;
|
||||
if (enum_value)
|
||||
enum_bit=LL(1) << (enum_value-1);
|
||||
enum_bit=1LL << (enum_value-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3244,7 +3244,7 @@ longlong Item_func_find_in_set::val_int()
|
|||
wc == (my_wc_t) separator)
|
||||
return (longlong) ++position;
|
||||
else
|
||||
return LL(0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -3965,7 +3965,7 @@ class Interruptible_wait
|
|||
|
||||
|
||||
/** Time to wait before polling the connection status. */
|
||||
const ulonglong Interruptible_wait::m_interrupt_interval= 5 * ULL(1000000000);
|
||||
const ulonglong Interruptible_wait::m_interrupt_interval= 5 * 1000000000ULL;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -4089,7 +4089,7 @@ longlong Item_func_get_lock::val_int()
|
|||
thd->mysys_var->current_mutex= &LOCK_user_locks;
|
||||
thd->mysys_var->current_cond= &ull->cond;
|
||||
|
||||
timed_cond.set_timeout(timeout * ULL(1000000000));
|
||||
timed_cond.set_timeout(timeout * 1000000000ULL);
|
||||
|
||||
error= 0;
|
||||
thd_wait_begin(thd, THD_WAIT_USER_LOCK);
|
||||
|
@ -4669,7 +4669,7 @@ double user_var_entry::val_real(bool *null_value)
|
|||
longlong user_var_entry::val_int(bool *null_value) const
|
||||
{
|
||||
if ((*null_value= (value == 0)))
|
||||
return LL(0);
|
||||
return 0;
|
||||
|
||||
switch (type) {
|
||||
case REAL_RESULT:
|
||||
|
@ -4693,7 +4693,7 @@ longlong user_var_entry::val_int(bool *null_value) const
|
|||
DBUG_ASSERT(0); // Impossible
|
||||
break;
|
||||
}
|
||||
return LL(0); // Impossible
|
||||
return 0; // Impossible
|
||||
}
|
||||
|
||||
|
||||
|
@ -5186,7 +5186,7 @@ longlong Item_func_get_user_var::val_int()
|
|||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
if (!var_entry)
|
||||
return LL(0); // No such variable
|
||||
return 0; // No such variable
|
||||
return (var_entry->val_int(&null_value));
|
||||
}
|
||||
|
||||
|
|
|
@ -3360,7 +3360,7 @@ String* Item_func_inet_ntoa::val_str(String* str)
|
|||
|
||||
Also return null if n > 255.255.255.255
|
||||
*/
|
||||
if ((null_value= (args[0]->null_value || n > (ulonglong) LL(4294967295))))
|
||||
if ((null_value= (args[0]->null_value || n > 0xffffffff)))
|
||||
return 0; // Null value
|
||||
|
||||
str->set_charset(collation.collation);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ITEM_SUM_INCLUDED
|
||||
#define ITEM_SUM_INCLUDED
|
||||
/* Copyright (c) 2000, 2011 Oracle and/or its affiliates.
|
||||
Copyright (c) 2008-2011 Monty Program Ab
|
||||
Copyright (c) 2008, 2013 Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1120,7 +1120,7 @@ public:
|
|||
class Item_sum_or :public Item_sum_bit
|
||||
{
|
||||
public:
|
||||
Item_sum_or(Item *item_par) :Item_sum_bit(item_par,LL(0)) {}
|
||||
Item_sum_or(Item *item_par) :Item_sum_bit(item_par, 0) {}
|
||||
Item_sum_or(THD *thd, Item_sum_or *item) :Item_sum_bit(thd, item) {}
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_or("; }
|
||||
|
@ -1141,7 +1141,7 @@ class Item_sum_and :public Item_sum_bit
|
|||
class Item_sum_xor :public Item_sum_bit
|
||||
{
|
||||
public:
|
||||
Item_sum_xor(Item *item_par) :Item_sum_bit(item_par,LL(0)) {}
|
||||
Item_sum_xor(Item *item_par) :Item_sum_bit(item_par, 0) {}
|
||||
Item_sum_xor(THD *thd, Item_sum_xor *item) :Item_sum_bit(thd, item) {}
|
||||
bool add();
|
||||
const char *func_name() const { return "bit_xor("; }
|
||||
|
|
|
@ -709,8 +709,8 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
|
|||
{
|
||||
longlong value;
|
||||
const char *start= str;
|
||||
for (value=0; str != end && my_isdigit(cs,*str) ; str++)
|
||||
value= value*LL(10) + (longlong) (*str - '0');
|
||||
for (value=0; str != end && my_isdigit(cs, *str) ; str++)
|
||||
value= value*10 + *str - '0';
|
||||
msec_length= 6 - (str - start);
|
||||
values[i]= value;
|
||||
while (str != end && !my_isdigit(cs,*str))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -551,7 +552,7 @@ struct sql_ex_info
|
|||
|
||||
/* Shouldn't be defined before */
|
||||
#define EXPECTED_OPTIONS \
|
||||
((ULL(1) << 14) | (ULL(1) << 26) | (ULL(1) << 27) | (ULL(1) << 19))
|
||||
((1ULL << 14) | (1ULL << 26) | (1ULL << 27) | (1ULL << 19))
|
||||
|
||||
#if OPTIONS_WRITTEN_TO_BIN_LOG != EXPECTED_OPTIONS
|
||||
#error OPTIONS_WRITTEN_TO_BIN_LOG must NOT change their values!
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2006, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -521,9 +522,9 @@ bool is_conversion_ok(int order, Relay_log_info *rli)
|
|||
bool allow_non_lossy, allow_lossy;
|
||||
|
||||
allow_non_lossy = slave_type_conversions_options &
|
||||
(ULL(1) << SLAVE_TYPE_CONVERSIONS_ALL_NON_LOSSY);
|
||||
(1ULL << SLAVE_TYPE_CONVERSIONS_ALL_NON_LOSSY);
|
||||
allow_lossy= slave_type_conversions_options &
|
||||
(ULL(1) << SLAVE_TYPE_CONVERSIONS_ALL_LOSSY);
|
||||
(1ULL << SLAVE_TYPE_CONVERSIONS_ALL_LOSSY);
|
||||
|
||||
DBUG_PRINT("enter", ("order: %d, flags:%s%s", order,
|
||||
allow_non_lossy ? " ALL_NON_LOSSY" : "",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2003, 2010, Oracle and/or its affiliates
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -60,7 +61,7 @@ public:
|
|||
intersect(map2buff);
|
||||
if (map.n_bits > sizeof(ulonglong) * 8)
|
||||
bitmap_set_above(&map, sizeof(ulonglong),
|
||||
test(map2buff & (LL(1) << (sizeof(ulonglong) * 8 - 1))));
|
||||
test(map2buff & (1LL << (sizeof(ulonglong) * 8 - 1))));
|
||||
}
|
||||
void subtract(Bitmap& map2) { bitmap_subtract(&map, &map2.map); }
|
||||
void merge(Bitmap& map2) { bitmap_union(&map, &map2.map); }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2012, Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -75,38 +75,38 @@ enum enum_mark_columns
|
|||
enum enum_filetype { FILETYPE_CSV, FILETYPE_XML };
|
||||
|
||||
/* Bits for different SQL modes modes (including ANSI mode) */
|
||||
#define MODE_REAL_AS_FLOAT 1
|
||||
#define MODE_PIPES_AS_CONCAT 2
|
||||
#define MODE_ANSI_QUOTES 4
|
||||
#define MODE_IGNORE_SPACE 8
|
||||
#define MODE_IGNORE_BAD_TABLE_OPTIONS 16
|
||||
#define MODE_ONLY_FULL_GROUP_BY 32
|
||||
#define MODE_NO_UNSIGNED_SUBTRACTION 64
|
||||
#define MODE_NO_DIR_IN_CREATE 128
|
||||
#define MODE_POSTGRESQL 256
|
||||
#define MODE_ORACLE 512
|
||||
#define MODE_MSSQL 1024
|
||||
#define MODE_DB2 2048
|
||||
#define MODE_MAXDB 4096
|
||||
#define MODE_NO_KEY_OPTIONS 8192
|
||||
#define MODE_NO_TABLE_OPTIONS 16384
|
||||
#define MODE_NO_FIELD_OPTIONS 32768
|
||||
#define MODE_MYSQL323 65536L
|
||||
#define MODE_MYSQL40 (MODE_MYSQL323*2)
|
||||
#define MODE_ANSI (MODE_MYSQL40*2)
|
||||
#define MODE_NO_AUTO_VALUE_ON_ZERO (MODE_ANSI*2)
|
||||
#define MODE_NO_BACKSLASH_ESCAPES (MODE_NO_AUTO_VALUE_ON_ZERO*2)
|
||||
#define MODE_STRICT_TRANS_TABLES (MODE_NO_BACKSLASH_ESCAPES*2)
|
||||
#define MODE_STRICT_ALL_TABLES (MODE_STRICT_TRANS_TABLES*2)
|
||||
#define MODE_NO_ZERO_IN_DATE (MODE_STRICT_ALL_TABLES*2)
|
||||
#define MODE_NO_ZERO_DATE (MODE_NO_ZERO_IN_DATE*2)
|
||||
#define MODE_INVALID_DATES (MODE_NO_ZERO_DATE*2)
|
||||
#define MODE_ERROR_FOR_DIVISION_BY_ZERO (MODE_INVALID_DATES*2)
|
||||
#define MODE_TRADITIONAL (MODE_ERROR_FOR_DIVISION_BY_ZERO*2)
|
||||
#define MODE_NO_AUTO_CREATE_USER (MODE_TRADITIONAL*2)
|
||||
#define MODE_HIGH_NOT_PRECEDENCE (MODE_NO_AUTO_CREATE_USER*2)
|
||||
#define MODE_NO_ENGINE_SUBSTITUTION (MODE_HIGH_NOT_PRECEDENCE*2)
|
||||
#define MODE_PAD_CHAR_TO_FULL_LENGTH (ULL(1) << 31)
|
||||
#define MODE_REAL_AS_FLOAT (1ULL << 0)
|
||||
#define MODE_PIPES_AS_CONCAT (1ULL << 1)
|
||||
#define MODE_ANSI_QUOTES (1ULL << 2)
|
||||
#define MODE_IGNORE_SPACE (1ULL << 3)
|
||||
#define MODE_IGNORE_BAD_TABLE_OPTIONS (1ULL << 4)
|
||||
#define MODE_ONLY_FULL_GROUP_BY (1ULL << 5)
|
||||
#define MODE_NO_UNSIGNED_SUBTRACTION (1ULL << 6)
|
||||
#define MODE_NO_DIR_IN_CREATE (1ULL << 7)
|
||||
#define MODE_POSTGRESQL (1ULL << 8)
|
||||
#define MODE_ORACLE (1ULL << 9)
|
||||
#define MODE_MSSQL (1ULL << 10)
|
||||
#define MODE_DB2 (1ULL << 11)
|
||||
#define MODE_MAXDB (1ULL << 12)
|
||||
#define MODE_NO_KEY_OPTIONS (1ULL << 13)
|
||||
#define MODE_NO_TABLE_OPTIONS (1ULL << 14)
|
||||
#define MODE_NO_FIELD_OPTIONS (1ULL << 15)
|
||||
#define MODE_MYSQL323 (1ULL << 16)
|
||||
#define MODE_MYSQL40 (1ULL << 17)
|
||||
#define MODE_ANSI (1ULL << 18)
|
||||
#define MODE_NO_AUTO_VALUE_ON_ZERO (1ULL << 19)
|
||||
#define MODE_NO_BACKSLASH_ESCAPES (1ULL << 20)
|
||||
#define MODE_STRICT_TRANS_TABLES (1ULL << 21)
|
||||
#define MODE_STRICT_ALL_TABLES (1ULL << 22)
|
||||
#define MODE_NO_ZERO_IN_DATE (1ULL << 23)
|
||||
#define MODE_NO_ZERO_DATE (1ULL << 24)
|
||||
#define MODE_INVALID_DATES (1ULL << 25)
|
||||
#define MODE_ERROR_FOR_DIVISION_BY_ZERO (1ULL << 26)
|
||||
#define MODE_TRADITIONAL (1ULL << 27)
|
||||
#define MODE_NO_AUTO_CREATE_USER (1ULL << 28)
|
||||
#define MODE_HIGH_NOT_PRECEDENCE (1ULL << 29)
|
||||
#define MODE_NO_ENGINE_SUBSTITUTION (1ULL << 30)
|
||||
#define MODE_PAD_CHAR_TO_FULL_LENGTH (1ULL << 31)
|
||||
|
||||
extern char internal_table_name[2];
|
||||
extern char empty_c_string[1];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2007, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2012, Monty Program Ab
|
||||
Copyright (c) 2008, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -226,7 +226,7 @@ void time_out_user_resource_limits(THD *thd, USER_CONN *uc)
|
|||
DBUG_ENTER("time_out_user_resource_limits");
|
||||
|
||||
/* If more than a hour since last check, reset resource checking */
|
||||
if (check_time - uc->reset_utime >= LL(3600000000))
|
||||
if (check_time - uc->reset_utime >= 3600000000ULL)
|
||||
{
|
||||
uc->questions=0;
|
||||
uc->updates=0;
|
||||
|
|
|
@ -2877,7 +2877,7 @@ void st_select_lex_unit::set_limit(st_select_lex *sl)
|
|||
val= fix_fields_successful ? item->val_uint() : 0;
|
||||
}
|
||||
else
|
||||
val= ULL(0);
|
||||
val= 0;
|
||||
|
||||
offset_limit_cnt= (ha_rows)val;
|
||||
#ifndef BIG_TABLES
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2012, Monty Program Ab
|
||||
Copyright (c) 2008, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1379,7 +1379,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||
if (!(uptime= (ulong) (thd->start_time - server_start_time)))
|
||||
queries_per_second1000= 0;
|
||||
else
|
||||
queries_per_second1000= thd->query_id * LL(1000) / uptime;
|
||||
queries_per_second1000= thd->query_id * 1000 / uptime;
|
||||
|
||||
length= my_snprintf(buff, buff_len - 1,
|
||||
"Uptime: %lu Threads: %d Questions: %lu "
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009-2011, Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -4717,8 +4717,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
|
|||
}
|
||||
alt_part_info->part_type= tab_part_info->part_type;
|
||||
alt_part_info->subpart_type= tab_part_info->subpart_type;
|
||||
if (alt_part_info->set_up_defaults_for_partitioning(new_table->file,
|
||||
ULL(0),
|
||||
if (alt_part_info->set_up_defaults_for_partitioning(new_table->file, 0,
|
||||
tab_part_info->num_parts))
|
||||
{
|
||||
goto err;
|
||||
|
@ -5134,8 +5133,7 @@ state of p1.
|
|||
alt_part_info->num_subparts= tab_part_info->num_subparts;
|
||||
DBUG_ASSERT(!alt_part_info->use_default_partitions);
|
||||
if (alt_part_info->set_up_defaults_for_partitioning(new_table->file,
|
||||
ULL(0),
|
||||
0))
|
||||
0, 0))
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
|
@ -5268,7 +5266,7 @@ the generated partition syntax in a correct manner.
|
|||
tab_part_info->use_default_num_subpartitions= FALSE;
|
||||
}
|
||||
if (tab_part_info->check_partition_info(thd, (handlerton**)NULL,
|
||||
new_table->file, ULL(0), TRUE))
|
||||
new_table->file, 0, TRUE))
|
||||
{
|
||||
goto err;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010-2011 Monty Program Ab
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -143,15 +143,15 @@
|
|||
however, needs to rollback the effects of the
|
||||
succeeded statement to keep replication consistent.
|
||||
*/
|
||||
#define OPTION_MASTER_SQL_ERROR (1ULL << 35)
|
||||
#define OPTION_MASTER_SQL_ERROR (1ULL << 35)
|
||||
|
||||
/*
|
||||
Dont report errors for individual rows,
|
||||
But just report error on commit (or read ofcourse)
|
||||
Note! Reserved for use in MySQL Cluster
|
||||
*/
|
||||
#define OPTION_ALLOW_BATCH (ULL(1) << 36) // THD, intern (slave)
|
||||
#define OPTION_SKIP_REPLICATION (ULL(1) << 37) // THD, user
|
||||
#define OPTION_ALLOW_BATCH (1ULL << 36) // THD, intern (slave)
|
||||
#define OPTION_SKIP_REPLICATION (1ULL << 37) // THD, user
|
||||
|
||||
/*
|
||||
Check how many bytes are available on buffer.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2012, Monty Program Ab
|
||||
Copyright (c) 2008, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -716,7 +716,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
|
|||
*p_start_coord= &start_coord;
|
||||
LOG_POS_COORD coord_buf= { log_file_name, BIN_LOG_HEADER_SIZE },
|
||||
*p_coord= &coord_buf;
|
||||
if (heartbeat_period != LL(0))
|
||||
if (heartbeat_period != 0)
|
||||
{
|
||||
heartbeat_ts= &heartbeat_buf;
|
||||
set_timespec_nsec(*heartbeat_ts, 0);
|
||||
|
@ -1827,7 +1827,7 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
|
|||
else
|
||||
mi->heartbeat_period= (float) min(SLAVE_MAX_HEARTBEAT_PERIOD,
|
||||
(slave_net_timeout/2.0));
|
||||
mi->received_heartbeats= LL(0); // counter lives until master is CHANGEd
|
||||
mi->received_heartbeats= 0; // counter lives until master is CHANGEd
|
||||
/*
|
||||
reset the last time server_id list if the current CHANGE MASTER
|
||||
is mentioning IGNORE_SERVER_IDS= (...)
|
||||
|
|
|
@ -2176,8 +2176,7 @@ JOIN::reinit()
|
|||
DBUG_ENTER("JOIN::reinit");
|
||||
|
||||
unit->offset_limit_cnt= (ha_rows)(select_lex->offset_limit ?
|
||||
select_lex->offset_limit->val_uint() :
|
||||
ULL(0));
|
||||
select_lex->offset_limit->val_uint() : 0);
|
||||
|
||||
first_record= 0;
|
||||
cleaned= false;
|
||||
|
|
|
@ -1017,13 +1017,13 @@ calc_time_diff(MYSQL_TIME *l_time1, MYSQL_TIME *l_time2, int l_sign, longlong *s
|
|||
(uint) l_time2->day);
|
||||
}
|
||||
|
||||
microseconds= ((longlong)days*LL(86400) +
|
||||
microseconds= ((longlong)days*86400LL +
|
||||
(longlong)(l_time1->hour*3600L +
|
||||
l_time1->minute*60L +
|
||||
l_time1->second) -
|
||||
l_sign*(longlong)(l_time2->hour*3600L +
|
||||
l_time2->minute*60L +
|
||||
l_time2->second)) * LL(1000000) +
|
||||
l_time2->second)) * 1000000LL +
|
||||
(longlong)l_time1->second_part -
|
||||
l_sign*(longlong)l_time2->second_part;
|
||||
|
||||
|
|
|
@ -103,14 +103,14 @@ class udf_handler :public Sql_alloc
|
|||
if (get_arguments())
|
||||
{
|
||||
*null_value=1;
|
||||
return LL(0);
|
||||
return 0;
|
||||
}
|
||||
Udf_func_longlong func= (Udf_func_longlong) u_d->func;
|
||||
longlong tmp=func(&initid, &f_args, &is_null, &error);
|
||||
if (is_null || error)
|
||||
{
|
||||
*null_value=1;
|
||||
return LL(0);
|
||||
return 0;
|
||||
}
|
||||
*null_value=0;
|
||||
return tmp;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 2007 Michael Widenius
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1256,7 +1257,7 @@ static my_bool allocate_head(MARIA_FILE_BITMAP *bitmap, uint size,
|
|||
a full page or a tail page
|
||||
*/
|
||||
if ((!bits && best_data) ||
|
||||
((bits & LL(04444444444444444)) == LL(04444444444444444)))
|
||||
((bits & 04444444444444444LL) == 04444444444444444LL))
|
||||
continue;
|
||||
for (i= 0; i < 16 ; i++, bits >>= 3)
|
||||
{
|
||||
|
@ -1344,8 +1345,8 @@ static my_bool allocate_tail(MARIA_FILE_BITMAP *bitmap, uint size,
|
|||
quite common case if we have blobs.
|
||||
*/
|
||||
|
||||
if ((!bits && best_data) || bits == LL(0xffffffffffff) ||
|
||||
bits == LL(04444444444444444))
|
||||
if ((!bits && best_data) || bits == 0xffffffffffffLL ||
|
||||
bits == 04444444444444444LL)
|
||||
continue;
|
||||
for (i= 0; i < 16; i++, bits >>= 3)
|
||||
{
|
||||
|
@ -1470,14 +1471,14 @@ static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
|
|||
bits= prefix_bits= uint6korr(data_start - 6);
|
||||
DBUG_ASSERT(bits != 0);
|
||||
/* 111 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 */
|
||||
if (!(bits & LL(07000000000000000)))
|
||||
if (!(bits & 07000000000000000LL))
|
||||
{
|
||||
data_start-= 6;
|
||||
do
|
||||
{
|
||||
prefix_area_size++;
|
||||
bits<<= 3;
|
||||
} while (!(bits & LL(07000000000000000)));
|
||||
} while (!(bits & 07000000000000000LL));
|
||||
area_size+= prefix_area_size;
|
||||
/* Calculate offset to page from data_start */
|
||||
prefix_area_size= 16 - prefix_area_size;
|
||||
|
@ -1526,11 +1527,11 @@ static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
|
|||
best_prefix_area_size= 16 - best_prefix_area_size;
|
||||
if (best_area_size < best_prefix_area_size)
|
||||
{
|
||||
tmp= (LL(1) << best_area_size*3) - 1;
|
||||
tmp= (1LL << best_area_size*3) - 1;
|
||||
best_area_size= best_prefix_area_size; /* for easy end test */
|
||||
}
|
||||
else
|
||||
tmp= (LL(1) << best_prefix_area_size*3) - 1;
|
||||
tmp= (1LL << best_prefix_area_size*3) - 1;
|
||||
tmp<<= (16 - best_prefix_area_size) * 3;
|
||||
DBUG_ASSERT((best_prefix_bits & tmp) == 0);
|
||||
best_prefix_bits|= tmp;
|
||||
|
|
|
@ -5454,7 +5454,7 @@ restart_bitmap_scan:
|
|||
{
|
||||
bits= uint6korr(data);
|
||||
/* Skip not allocated pages and blob / full tail pages */
|
||||
if (bits && bits != LL(07777777777777777))
|
||||
if (bits && bits != 07777777777777777LL)
|
||||
break;
|
||||
}
|
||||
bit_pos= 0;
|
||||
|
|
|
@ -1215,19 +1215,19 @@ uint maria_get_pointer_length(ulonglong file_length, uint def)
|
|||
if (file_length) /* If not default */
|
||||
{
|
||||
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
|
||||
if (file_length >= (ULL(1) << 56))
|
||||
if (file_length >= (1ULL << 56))
|
||||
def=8;
|
||||
else
|
||||
#endif
|
||||
if (file_length >= (ULL(1) << 48))
|
||||
if (file_length >= (1ULL << 48))
|
||||
def=7;
|
||||
else if (file_length >= (ULL(1) << 40))
|
||||
else if (file_length >= (1ULL << 40))
|
||||
def=6;
|
||||
else if (file_length >= (ULL(1) << 32))
|
||||
else if (file_length >= (1ULL << 32))
|
||||
def=5;
|
||||
else if (file_length >= (ULL(1) << 24))
|
||||
else if (file_length >= (1ULL << 24))
|
||||
def=4;
|
||||
else if (file_length >= (ULL(1) << 16))
|
||||
else if (file_length >= (1ULL << 16))
|
||||
def=3;
|
||||
else
|
||||
def=2;
|
||||
|
|
|
@ -99,7 +99,7 @@ uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid)
|
|||
uchar *start;
|
||||
uint length;
|
||||
uchar buff[8];
|
||||
DBUG_ASSERT(trid < (LL(1) << (MARIA_MAX_PACK_TRANSID_SIZE*8)));
|
||||
DBUG_ASSERT(trid < (1LL << (MARIA_MAX_PACK_TRANSID_SIZE*8)));
|
||||
DBUG_ASSERT(trid >= info->s->state.create_trid);
|
||||
|
||||
trid= (trid - info->s->state.create_trid) << 1;
|
||||
|
|
|
@ -3274,7 +3274,7 @@ static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr,
|
|||
DBUG_PRINT("info", ("File size: %s", llstr(file_size, buff)));
|
||||
if (file_size == MY_FILEPOS_ERROR)
|
||||
DBUG_RETURN(1);
|
||||
DBUG_ASSERT(file_size < ULL(0xffffffff));
|
||||
DBUG_ASSERT(file_size < 0xffffffffULL);
|
||||
if (((uint32)file_size) > TRANSLOG_PAGE_SIZE)
|
||||
{
|
||||
rec_offset= (((((uint32)file_size) / TRANSLOG_PAGE_SIZE) - 1) *
|
||||
|
@ -3785,12 +3785,12 @@ my_bool translog_init_with_table(const char *directory,
|
|||
TRANSLOG_FILE *file= (TRANSLOG_FILE *)my_malloc(sizeof(TRANSLOG_FILE),
|
||||
MYF(0));
|
||||
|
||||
compile_time_assert(MY_FILEPOS_ERROR > ULL(0xffffffff));
|
||||
compile_time_assert(MY_FILEPOS_ERROR > 0xffffffffULL);
|
||||
if (file == NULL ||
|
||||
(file->handler.file=
|
||||
open_logfile_by_number_no_cache(i)) < 0 ||
|
||||
mysql_file_seek(file->handler.file, 0, SEEK_END, MYF(0)) >=
|
||||
ULL(0xffffffff))
|
||||
0xffffffffULL)
|
||||
{
|
||||
int j;
|
||||
for (j= i - log_descriptor.min_file - 1; j > 0; j--)
|
||||
|
@ -5247,7 +5247,7 @@ static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst)
|
|||
dst[0]= (uchar)(0x80 | (diff >> 24));
|
||||
int3store(dst + 1, diff & 0xFFFFFFL);
|
||||
}
|
||||
else if (diff <= LL(0x3FFFFFFFFF))
|
||||
else if (diff <= 0x3FFFFFFFFFLL)
|
||||
|
||||
{
|
||||
dst-= 5;
|
||||
|
@ -5344,7 +5344,7 @@ static uchar *translog_get_LSN_from_diff(LSN base_lsn, uchar *src, uchar *dst)
|
|||
{
|
||||
/* take 1 from file offset */
|
||||
first_byte++;
|
||||
base_offset+= LL(0x100000000);
|
||||
base_offset+= 0x100000000LL;
|
||||
}
|
||||
file_no= LSN_FILE_NO(base_lsn) - first_byte;
|
||||
DBUG_ASSERT(base_offset - diff <= UINT_MAX);
|
||||
|
|
|
@ -83,8 +83,8 @@ typedef TRANSLOG_ADDRESS LSN;
|
|||
other bytes are a LSN.
|
||||
*/
|
||||
typedef LSN LSN_WITH_FLAGS;
|
||||
#define LSN_WITH_FLAGS_TO_LSN(x) (x & ULL(0x00FFFFFFFFFFFFFF))
|
||||
#define LSN_WITH_FLAGS_TO_FLAGS(x) (x & ULL(0xFF00000000000000))
|
||||
#define LSN_WITH_FLAGS_TO_LSN(x) (x & 0x00FFFFFFFFFFFFFFULL)
|
||||
#define LSN_WITH_FLAGS_TO_FLAGS(x) (x & 0xFF00000000000000ULL)
|
||||
|
||||
#define FILENO_IMPOSSIBLE 0 /**< log file's numbering starts at 1 */
|
||||
#define LOG_OFFSET_IMPOSSIBLE 0 /**< log always has a header */
|
||||
|
@ -106,6 +106,6 @@ typedef LSN LSN_WITH_FLAGS;
|
|||
Unlike ULONGLONG_MAX, it can be safely used in comparison with valid LSNs
|
||||
(ULONGLONG_MAX is too big for correctness of cmp_translog_addr()).
|
||||
*/
|
||||
#define LSN_MAX (LSN)ULL(0x00FFFFFFFFFFFFFF)
|
||||
#define LSN_MAX (LSN)0x00FFFFFFFFFFFFFFULL
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1650,7 +1650,7 @@ static void unlink_hash(PAGECACHE *pagecache, PAGECACHE_HASH_LINK *hash_link)
|
|||
struct st_my_thread_var *thread;
|
||||
|
||||
hash_link->file= first_page->file;
|
||||
DBUG_ASSERT(first_page->pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(first_page->pageno < ((1ULL) << 40));
|
||||
hash_link->pageno= first_page->pageno;
|
||||
do
|
||||
{
|
||||
|
@ -1813,7 +1813,7 @@ restart:
|
|||
goto restart;
|
||||
}
|
||||
hash_link->file= *file;
|
||||
DBUG_ASSERT(pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(pageno < ((1ULL) << 40));
|
||||
hash_link->pageno= pageno;
|
||||
link_hash(start, hash_link);
|
||||
/* Register the request for the page */
|
||||
|
@ -3357,7 +3357,7 @@ uchar *pagecache_read(PAGECACHE *pagecache,
|
|||
page_cache_page_pin_str[unlock_pin]));
|
||||
DBUG_ASSERT(buff != 0 || (buff == 0 && (unlock_pin == PAGECACHE_PIN ||
|
||||
unlock_pin == PAGECACHE_PIN_LEFT_PINNED)));
|
||||
DBUG_ASSERT(pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(pageno < ((1ULL) << 40));
|
||||
#endif
|
||||
|
||||
if (!page_link)
|
||||
|
@ -3797,7 +3797,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
|
|||
pin == PAGECACHE_PIN_LEFT_PINNED);
|
||||
restart:
|
||||
|
||||
DBUG_ASSERT(pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(pageno < ((1ULL) << 40));
|
||||
if (pagecache->can_be_used)
|
||||
{
|
||||
/* Key cache is used */
|
||||
|
@ -3977,7 +3977,7 @@ my_bool pagecache_write_part(PAGECACHE *pagecache,
|
|||
DBUG_ASSERT(lock != PAGECACHE_LOCK_LEFT_READLOCKED);
|
||||
DBUG_ASSERT(lock != PAGECACHE_LOCK_READ_UNLOCK);
|
||||
DBUG_ASSERT(offset + size <= pagecache->block_size);
|
||||
DBUG_ASSERT(pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(pageno < ((1ULL) << 40));
|
||||
#endif
|
||||
|
||||
if (!page_link)
|
||||
|
@ -4974,7 +4974,7 @@ my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache,
|
|||
ptr+= 2;
|
||||
ptr[0]= (share->kfile.file == block->hash_link->file.file);
|
||||
ptr++;
|
||||
DBUG_ASSERT(block->hash_link->pageno < ((ULL(1)) << 40));
|
||||
DBUG_ASSERT(block->hash_link->pageno < ((1ULL) << 40));
|
||||
page_store(ptr, block->hash_link->pageno);
|
||||
ptr+= PAGE_STORE_SIZE;
|
||||
lsn_store(ptr, block->rec_lsn);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (C) 2006, 2007 MySQL AB
|
||||
Copyright (C) 2010-2011 Monty Program Ab
|
||||
Copyright (C) 2010, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -3683,7 +3683,7 @@ static void print_redo_phase_progress(TRANSLOG_ADDRESS addr)
|
|||
end_offset);
|
||||
if (initial_remainder == (ulonglong)(-1))
|
||||
initial_remainder= local_remainder;
|
||||
percentage_done= (uint) ((initial_remainder - local_remainder) * ULL(100) /
|
||||
percentage_done= (uint) ((initial_remainder - local_remainder) * 100ULL /
|
||||
initial_remainder);
|
||||
if ((percentage_done - percentage_printed) >= 10)
|
||||
{
|
||||
|
|
|
@ -855,7 +855,7 @@ struct st_maria_handler
|
|||
#define MARIA_MAX_KEYPTR_SIZE 5 /* For calculating block lengths */
|
||||
|
||||
/* Marker for impossible delete link */
|
||||
#define IMPOSSIBLE_PAGE_NO LL(0xFFFFFFFFFF)
|
||||
#define IMPOSSIBLE_PAGE_NO 0xFFFFFFFFFFLL
|
||||
|
||||
/* The UNIQUE check is done with a hashed long key */
|
||||
|
||||
|
|
|
@ -1905,7 +1905,7 @@ static int make_huff_decode_table(HUFF_TREE *huff_tree, uint trees)
|
|||
return 1;
|
||||
huff_tree->code_len=(uchar*) (huff_tree->code+elements);
|
||||
make_traverse_code_tree(huff_tree, huff_tree->root,
|
||||
8 * sizeof(ulonglong), LL(0));
|
||||
8 * sizeof(ulonglong), 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -56,7 +56,7 @@ struct st_ma_transaction
|
|||
uint16 flags; /**< Various flags */
|
||||
};
|
||||
|
||||
#define TRANSACTION_LOGGED_LONG_ID ULL(0x8000000000000000)
|
||||
#define TRANSACTION_LOGGED_LONG_ID 0x8000000000000000ULL
|
||||
#define MAX_TRID (~(TrID)0)
|
||||
|
||||
extern WT_RESOURCE_TYPE ma_rc_dup_unique;
|
||||
|
|
|
@ -277,7 +277,7 @@ static int test_five_logs_and_max_trid(void)
|
|||
|
||||
RET_ERR_UNLESS(open_file() == CONTROL_FILE_OK);
|
||||
expect_logno= 100;
|
||||
expect_max_trid= ULL(14111978111);
|
||||
expect_max_trid= 14111978111ULL;
|
||||
for (i= 0; i<5; i++)
|
||||
{
|
||||
expect_logno*= 3;
|
||||
|
|
|
@ -45,7 +45,7 @@ pthread_handler_t test_trnman(void *arg)
|
|||
|
||||
for (x= ((int)(intptr)(&m)); m > 0; )
|
||||
{
|
||||
y= x= (x*LL(3628273133) + LL(1500450271)) % LL(9576890767); /* three prime numbers */
|
||||
y= x= (x*3628273133LL + 1500450271LL) % 9576890767LL; /* three prime numbers */
|
||||
m-= n= x % MAX_ITER;
|
||||
for (i= 0; i < n; i++)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -863,19 +864,19 @@ uint mi_get_pointer_length(ulonglong file_length, uint def)
|
|||
if (file_length) /* If not default */
|
||||
{
|
||||
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
|
||||
if (file_length >= ULL(1) << 56)
|
||||
if (file_length >= 1ULL << 56)
|
||||
def=8;
|
||||
else
|
||||
#endif
|
||||
if (file_length >= ULL(1) << 48)
|
||||
if (file_length >= 1ULL << 48)
|
||||
def=7;
|
||||
else if (file_length >= ULL(1) << 40)
|
||||
else if (file_length >= 1ULL << 40)
|
||||
def=6;
|
||||
else if (file_length >= ULL(1) << 32)
|
||||
else if (file_length >= 1ULL << 32)
|
||||
def=5;
|
||||
else if (file_length >= ULL(1) << 24)
|
||||
else if (file_length >= 1ULL << 24)
|
||||
def=4;
|
||||
else if (file_length >= ULL(1) << 16)
|
||||
else if (file_length >= 1ULL << 16)
|
||||
def=3;
|
||||
else
|
||||
def=2;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1931,7 +1932,7 @@ static int make_huff_decode_table(HUFF_TREE *huff_tree, uint trees)
|
|||
return 1;
|
||||
huff_tree->code_len=(uchar*) (huff_tree->code+elements);
|
||||
make_traverse_code_tree(huff_tree, huff_tree->root,
|
||||
8 * sizeof(ulonglong), LL(0));
|
||||
8 * sizeof(ulonglong), 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2003, 2012, Oracle and/or its affiliates
|
||||
Copyright (c) 2009, 2011, Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
|
@ -40,11 +40,11 @@
|
|||
|
||||
#undef ULONGLONG_MAX
|
||||
#define ULONGLONG_MAX (~(ulonglong) 0)
|
||||
#define MAX_NEGATIVE_NUMBER ((ulonglong) LL(0x8000000000000000))
|
||||
#define MAX_NEGATIVE_NUMBER ((ulonglong) 0x8000000000000000LL)
|
||||
#define INIT_CNT 9
|
||||
#define LFACTOR ULL(1000000000)
|
||||
#define LFACTOR1 ULL(10000000000)
|
||||
#define LFACTOR2 ULL(100000000000)
|
||||
#define LFACTOR 1000000000ULL
|
||||
#define LFACTOR1 10000000000ULL
|
||||
#define LFACTOR2 100000000000ULL
|
||||
|
||||
#if defined(HAVE_CHARSET_utf32) || defined(HAVE_CHARSET_mb2)
|
||||
static unsigned long lfactor[9]=
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2004, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2011, Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1032,7 +1032,7 @@ int decimal2ulonglong(const decimal_t *from, ulonglong *to)
|
|||
|
||||
if (from->sign)
|
||||
{
|
||||
*to=ULL(0);
|
||||
*to= 0;
|
||||
return E_DEC_OVERFLOW;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2003 TXT DataKonsult Ab
|
||||
Copyright (c) 2009-2011, Monty Program Ab
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
|
@ -29,11 +29,11 @@
|
|||
#include "strings_def.h"
|
||||
#include <my_sys.h> /* Needed for MY_ERRNO_ERANGE */
|
||||
|
||||
#define MAX_NEGATIVE_NUMBER ((ulonglong) LL(0x8000000000000000))
|
||||
#define MAX_NEGATIVE_NUMBER ((ulonglong) 0x8000000000000000ULL)
|
||||
#define INIT_CNT 9
|
||||
#define LFACTOR ULL(1000000000)
|
||||
#define LFACTOR1 ULL(10000000000)
|
||||
#define LFACTOR2 ULL(100000000000)
|
||||
#define LFACTOR 1000000000ULL
|
||||
#define LFACTOR1 10000000000ULL
|
||||
#define LFACTOR2 100000000000ULL
|
||||
|
||||
static unsigned long lfactor[9]=
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2012, Monty Program Ab
|
||||
Copyright (c) 2008, 2013, Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -9862,11 +9862,11 @@ static void test_bug3035()
|
|||
const uint32 uint32_max= 4294967295U;
|
||||
|
||||
/* it might not work okay everyplace */
|
||||
const longlong int64_max= LL(9223372036854775807);
|
||||
const longlong int64_max= 9223372036854775807LL;
|
||||
const longlong int64_min= -int64_max - 1;
|
||||
|
||||
const ulonglong uint64_min= 0U;
|
||||
const ulonglong uint64_max= ULL(18446744073709551615);
|
||||
const ulonglong uint64_max= 18446744073709551615ULL;
|
||||
|
||||
const char *stmt_text;
|
||||
|
||||
|
@ -12533,7 +12533,7 @@ static void test_truncation()
|
|||
|
||||
/* double -> longlong, negative fp number to signed integer: no loss */
|
||||
DIE_UNLESS(my_bind++ < bind_array + bind_count);
|
||||
DIE_UNLESS(! *my_bind->error && * (longlong*) my_bind->buffer == LL(-12345678910));
|
||||
DIE_UNLESS(! *my_bind->error && * (longlong*) my_bind->buffer == -12345678910LL);
|
||||
|
||||
/* big numeric string -> number */
|
||||
DIE_UNLESS(my_bind++ < bind_array + bind_count);
|
||||
|
@ -14535,7 +14535,7 @@ static void test_bug12925()
|
|||
{
|
||||
myheader("test_bug12925");
|
||||
if (opt_getopt_ll_test)
|
||||
DIE_UNLESS(opt_getopt_ll_test == LL(25600*1024*1024));
|
||||
DIE_UNLESS(opt_getopt_ll_test == 25600LL*1024*1024);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue