summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_ndbcluster.cc8
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/sql_delete.cc9
-rw-r--r--sql/sql_lex.cc1
4 files changed, 8 insertions, 12 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 604a5ea19e2..8701a216b8e 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -733,8 +733,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
DBUG_DUMP("value", (char*)&bits, pack_len);
#ifdef WORDS_BIGENDIAN
/* store lsw first */
- bits = ((bits >> 32) & 0x00000000FFFFFFFF)
- | ((bits << 32) & 0xFFFFFFFF00000000);
+ bits = ((bits >> 32) & 0x00000000FFFFFFFFLL)
+ | ((bits << 32) & 0xFFFFFFFF00000000LL);
#endif
DBUG_RETURN(ndb_op->setValue(fieldnr, (char*)&bits, pack_len) != 0);
}
@@ -2685,10 +2685,10 @@ void ha_ndbcluster::unpack_record(byte* buf)
/* lsw is stored first */
Uint32 *buf= (Uint32 *)(*value).rec->aRef();
((Field_bit *) *field)->store((((longlong)*buf)
- & 0x000000000FFFFFFFF)
+ & 0x000000000FFFFFFFFLL)
|
((((longlong)*(buf+1)) << 32)
- & 0xFFFFFFFF00000000),
+ & 0xFFFFFFFF00000000LL),
TRUE);
#else
((Field_bit *) *field)->store((longlong)
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c4279d1bd4e..503b4362e7a 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -4734,7 +4734,7 @@ bool Item_func_match::fix_index()
for (keynr=0 ; keynr < table->s->keys ; keynr++)
{
if ((table->key_info[keynr].flags & HA_FULLTEXT) &&
- (table->keys_in_use_for_query.is_set(keynr)))
+ (table->s->keys_in_use.is_set(keynr)))
{
ft_to_key[fts]=keynr;
ft_cnt[fts]=0;
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 071acb57945..bccd4d4cafe 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -369,8 +369,6 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
{
Item *fake_conds= 0;
SELECT_LEX *select_lex= &thd->lex->select_lex;
- const char *operation = thd->lex->sql_command == SQLCOM_TRUNCATE ?
- "TRUNCATE" : "DELETE";
DBUG_ENTER("mysql_prepare_delete");
List<Item> all_fields;
@@ -385,14 +383,14 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds)
DBUG_RETURN(TRUE);
if (!table_list->updatable || check_key_in_view(thd, table_list))
{
- my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, operation);
+ my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "DELETE");
DBUG_RETURN(TRUE);
}
{
TABLE_LIST *duplicate;
if ((duplicate= unique_table(thd, table_list, table_list->next_global, 0)))
{
- update_non_unique_table_error(table_list, operation, duplicate);
+ update_non_unique_table_error(table_list, "DELETE", duplicate);
DBUG_RETURN(TRUE);
}
}
@@ -897,8 +895,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if (!dont_send_ok)
{
db_type table_type;
- if (mysql_frm_type(thd, path, &table_type) == FRMTYPE_VIEW)
- goto trunc_by_del;
+ mysql_frm_type(thd, path, &table_type);
if (table_type == DB_TYPE_UNKNOWN)
{
my_error(ER_NO_SUCH_TABLE, MYF(0),
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 4be0aca3ea7..3be844b6761 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1834,7 +1834,6 @@ bool st_lex::can_use_merged()
case SQLCOM_UPDATE_MULTI:
case SQLCOM_DELETE:
case SQLCOM_DELETE_MULTI:
- case SQLCOM_TRUNCATE:
case SQLCOM_INSERT:
case SQLCOM_INSERT_SELECT:
case SQLCOM_REPLACE: