diff options
author | unknown <konstantin@mysql.com> | 2005-05-05 13:47:09 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-05-05 13:47:09 +0400 |
commit | 7f33809731e31b20735c2aeed16cfdc19c3e9374 (patch) | |
tree | d4d95ecf06af07753385c725dd79f59678cb5ffe /sql | |
parent | a001bb2b9d6cb458b53b1ceb3d10be4d8dab2cbf (diff) | |
parent | c758512a9176b40532f8431e7771f8dbeed77111 (diff) | |
download | mariadb-git-7f33809731e31b20735c2aeed16cfdc19c3e9374.tar.gz |
Manual merge
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innodb.cc | 10 | ||||
-rw-r--r-- | sql/item.cc | 24 | ||||
-rw-r--r-- | sql/item.h | 7 | ||||
-rw-r--r-- | sql/sql_bitmap.h | 2 |
4 files changed, 31 insertions, 12 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 2039ee1498f..0c70713f0d3 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -6429,15 +6429,15 @@ ha_innobase::store_lock( (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) && thd->lex->sql_command != SQLCOM_SELECT && thd->lex->sql_command != SQLCOM_UPDATE_MULTI && - thd->lex->sql_command != SQLCOM_DELETE_MULTI ) { + thd->lex->sql_command != SQLCOM_DELETE_MULTI && + thd->lex->sql_command != SQLCOM_LOCK_TABLES) { /* In case we have innobase_locks_unsafe_for_binlog option set and isolation level of the transaction is not set to serializable and MySQL is doing - INSERT INTO...SELECT without FOR UPDATE or IN - SHARE MODE we use consistent read for select. - Similarly, in case of DELETE...SELECT and - UPDATE...SELECT when these are not multi table.*/ + INSERT INTO...SELECT or UPDATE ... = (SELECT ...) + without FOR UPDATE or IN SHARE MODE in select, then + we use consistent read for select. */ prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; diff --git a/sql/item.cc b/sql/item.cc index 5a49124fc43..7d0a5fbdccc 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1341,6 +1341,13 @@ Item_uint::Item_uint(const char *str_arg, uint length): } +Item_uint::Item_uint(const char *str_arg, longlong i, uint length): + Item_int(str_arg, i, length) +{ + unsigned_flag= 1; +} + + String *Item_uint::val_str(String *str) { // following assert is redundant, because fixed=1 assigned in constructor @@ -2234,7 +2241,9 @@ Item_param::new_item() case NULL_VALUE: return new Item_null(name); case INT_VALUE: - return new Item_int(name, value.integer, max_length); + return (unsigned_flag ? + new Item_uint(name, value.integer, max_length) : + new Item_int(name, value.integer, max_length)); case REAL_VALUE: return new Item_float(name, value.real, decimals, max_length); case STRING_VALUE: @@ -3517,6 +3526,19 @@ bool Item_int::eq(const Item *arg, bool binary_cmp) const } +Item *Item_int_with_ref::new_item() +{ + DBUG_ASSERT(ref->basic_const_item()); + /* + We need to evaluate the constant to make sure it works with + parameter markers. + */ + return (ref->unsigned_flag ? + new Item_uint(ref->name, ref->val_int(), ref->max_length) : + new Item_int(ref->name, ref->val_int(), ref->max_length)); +} + + Item_num *Item_uint::neg() { Item_decimal *item= new Item_decimal(value, 0); diff --git a/sql/item.h b/sql/item.h index 90256503c53..96705b34a3e 100644 --- a/sql/item.h +++ b/sql/item.h @@ -991,6 +991,7 @@ class Item_uint :public Item_int { public: Item_uint(const char *str_arg, uint length); + Item_uint(const char *str_arg, longlong i, uint length); Item_uint(uint32 i) :Item_int((longlong) i, 10) { unsigned_flag= 1; } double val_real() @@ -1397,11 +1398,7 @@ public: { return ref->save_in_field(field, no_conversions); } - Item *new_item() - { - return (ref->unsigned_flag)? new Item_uint(ref->name, ref->max_length) : - new Item_int(ref->name, ref->max_length); - } + Item *new_item(); }; diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 5c51f3ecb67..2fd603d9381 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -91,7 +91,7 @@ template <> class Bitmap<64> ulonglong map; public: Bitmap<64>() { } -#if defined(__NETWARE__) +#if defined(__NETWARE__) || defined(__MWERKS__) /* Metwork compiler gives error on Bitmap<64> Changed to Bitmap, since in this case also it will proper construct |