List:Commits« Previous MessageNext Message »
From:jonas Date:August 7 2008 3:17pm
Subject:bzr commit into mysql-5.1-telco-6.4 branch (jonas:2670)
View as plain text  
#At file:///home/jonas/src/telco-6.4/

 2670 jonas@stripped	2008-08-07 [merge]
      merge 6.3 to 6.4
modified:
  mysql-test/suite/ndb/r/ndb_multi_row.result
  mysql-test/suite/ndb/r/ndb_trigger.result
  mysql-test/suite/ndb/t/ndb_trigger.test
  mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result
  mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result
  sql/ha_ndbcluster.cc
  sql/ha_ndbcluster_binlog.cc
  storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp
  storage/ndb/include/ndbapi/NdbOperation.hpp
  storage/ndb/include/ndbapi/NdbTransaction.hpp

=== modified file 'mysql-test/suite/ndb/r/ndb_multi_row.result'
--- a/mysql-test/suite/ndb/r/ndb_multi_row.result	2007-11-01 14:08:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_multi_row.result	2008-08-07 05:29:44 +0000
@@ -63,6 +63,6 @@ t4
 drop table t1, t2, t3, t4;
 drop table if exists t1, t3, t4;
 Warnings:
-Error	155	Table 'test.t1' doesn't exist
-Error	155	Table 'test.t3' doesn't exist
-Error	155	Table 'test.t4' doesn't exist
+Note	1051	Unknown table 't1'
+Note	1051	Unknown table 't3'
+Note	1051	Unknown table 't4'

=== modified file 'mysql-test/suite/ndb/r/ndb_trigger.result'
--- a/mysql-test/suite/ndb/r/ndb_trigger.result	2007-07-04 20:38:53 +0000
+++ b/mysql-test/suite/ndb/r/ndb_trigger.result	2008-08-07 05:29:44 +0000
@@ -1,4 +1,7 @@
 drop table if exists t1, t2, t3, t4, t5;
+flush status;
+drop table if exists t1, t2, t3, t4, t5;
+flush status;
 create table t1 (id int primary key, a int not null, b decimal (63,30) default 0)
engine=ndb;
 create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb;
 create table t3  engine=ndb select 1 as i;
@@ -312,4 +315,29 @@ id	xy
 DROP TRIGGER t1_delete;
 DROP TRIGGER t4_delete;
 DROP TABLE t1, t2, t3, t4, t5;
+create table t1(a int, b varchar(10), c date) engine=ndb;
+CREATE TRIGGER trg1 BEFORE UPDATE ON t1 FOR EACH ROW BEGIN
+SET new.c = date(now());
+End //
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+trigger_name	event_object_table
+trg1	t1
+CREATE TRIGGER trg1 BEFORE UPDATE ON t1 FOR EACH ROW BEGIN
+SET new.c = date(now());
+End //
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+trigger_name	event_object_table
+trg1	t1
+rename table t1 to t2;
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+trigger_name	event_object_table
+trg1	t2
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+trigger_name	event_object_table
+trg1	t2
+drop table t2;
 End of 5.1 tests

=== modified file 'mysql-test/suite/ndb/t/ndb_trigger.test'
--- a/mysql-test/suite/ndb/t/ndb_trigger.test	2007-11-29 10:29:35 +0000
+++ b/mysql-test/suite/ndb/t/ndb_trigger.test	2008-08-07 11:51:34 +0000
@@ -1,5 +1,6 @@
 # Tests which involve triggers and NDB storage engine
---source include/have_ndb.inc
+--source include/have_multi_ndb.inc
+--source include/not_embedded.inc
 
 # 
 # Test for bug#18437 "Wrong values inserted with a before update
@@ -13,7 +14,12 @@
 #
 
 --disable_warnings
+connection server2;
 drop table if exists t1, t2, t3, t4, t5;
+flush status;
+connection server1;
+drop table if exists t1, t2, t3, t4, t5;
+flush status;
 --enable_warnings
 
 create table t1 (id int primary key, a int not null, b decimal (63,30) default 0)
engine=ndb;
@@ -217,4 +223,39 @@ DROP TRIGGER t1_delete;
 DROP TRIGGER t4_delete;
 DROP TABLE t1, t2, t3, t4, t5;
 
+# Test for bug#36658
+# Verify that rename table
+# doesn't remove triggers
+
+connection server1;
+create table t1(a int, b varchar(10), c date) engine=ndb;
+delimiter //;
+CREATE TRIGGER trg1 BEFORE UPDATE ON t1 FOR EACH ROW BEGIN
+   SET new.c = date(now());
+End //
+delimiter ;//
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+
+connection server2;
+delimiter //;
+CREATE TRIGGER trg1 BEFORE UPDATE ON t1 FOR EACH ROW BEGIN
+   SET new.c = date(now());
+End //
+delimiter ;//
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+
+connection server1;
+rename table t1 to t2;
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+
+connection server2;
+select trigger_name,event_object_table from information_schema.triggers where
+trigger_name='trg1';
+
+connection server1;
+drop table t2;
+
 --echo End of 5.1 tests

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result	2008-02-25 13:50:20 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_ddl_multi.result	2008-08-07 05:29:44 +0000
@@ -33,11 +33,11 @@ drop table mysqltest.t1;
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	102	#	ALTER DATABASE mysqltest CHARACTER SET latin1
-master-bin.000001	#	Query	102	#	use `mysqltest`; drop table `t1`
+master-bin.000001	#	Query	102	#	use `mysqltest`; drop table `mysqltest`.`t1`
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	#	Query	102	#	ALTER DATABASE mysqltest CHARACTER SET latin1
-master-bin.000001	#	Query	102	#	use `mysqltest`; drop table `t1`
+master-bin.000001	#	Query	102	#	use `mysqltest`; drop table `mysqltest`.`t1`
 reset master;
 reset master;
 use test;
@@ -161,10 +161,10 @@ Log_name	Pos	Event_type	Server_id	End_lo
 master-bin1.000001	#	Query	1	#	use `test`; create table t1 (a int key) engine=ndb
 master-bin1.000001	#	Query	1	#	use `test`; create table t2 (a int key) engine=ndb
 master-bin1.000001	#	Query	1	#	use `test`; create table t3 (a int key) engine=ndb
-master-bin1.000001	#	Query	1	#	use `test`; rename table `test.t3` to `test.t4`
-master-bin1.000001	#	Query	1	#	use `test`; rename table `test.t2` to `test.t3`
-master-bin1.000001	#	Query	1	#	use `test`; rename table `test.t1` to `test.t2`
-master-bin1.000001	#	Query	1	#	use `test`; rename table `test.t4` to `test.t1`
+master-bin1.000001	#	Query	1	#	use `test`; rename table `test`.`t3` to `test`.`t4`
+master-bin1.000001	#	Query	1	#	use `test`; rename table `test`.`t2` to `test`.`t3`
+master-bin1.000001	#	Query	1	#	use `test`; rename table `test`.`t1` to `test`.`t2`
+master-bin1.000001	#	Query	1	#	use `test`; rename table `test`.`t4` to `test`.`t1`
 drop table t1;
 drop table t2;
 drop table t3;
@@ -188,7 +188,7 @@ master-bin1.000001	#	Table_map	102	#	tab
 master-bin1.000001	#	Write_rows	102	#	table_id: #
 master-bin1.000001	#	Write_rows	102	#	table_id: # flags: STMT_END_F
 master-bin1.000001	#	Query	102	#	COMMIT
-master-bin1.000001	#	Query	1	#	use `test`; rename table `test.t1` to `test.t2`
+master-bin1.000001	#	Query	1	#	use `test`; rename table `test`.`t1` to `test`.`t2`
 master-bin1.000001	#	Query	102	#	BEGIN
 master-bin1.000001	#	Table_map	102	#	table_id: # (test.t2)
 master-bin1.000001	#	Table_map	102	#	table_id: # (mysql.ndb_apply_status)

=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result	2008-06-19 07:18:42 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_log_bin.result	2008-08-07 05:29:44 +0000
@@ -53,8 +53,8 @@ use mysqltest;
 insert into t2 values (1,1);
 show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin1.000001	#	Query	1	#	use `mysqltest`; drop table `t1`
-master-bin1.000001	#	Query	1	#	use `mysqltest`; drop table `t2`
+master-bin1.000001	#	Query	1	#	use `mysqltest`; drop table `mysqltest`.`t1`
+master-bin1.000001	#	Query	1	#	use `mysqltest`; drop table `mysqltest`.`t2`
 master-bin1.000001	#	Query	1	#	use `mysqltest`; create table t1 (d int key, e int)
engine=ndb
 master-bin1.000001	#	Query	1	#	use `mysqltest`; create table t2 (d int key, e int)
engine=ndb
 master-bin1.000001	#	Query	102	#	BEGIN

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2008-07-01 07:53:42 +0000
+++ b/sql/ha_ndbcluster.cc	2008-08-07 13:17:36 +0000
@@ -158,6 +158,7 @@ static uchar *ndbcluster_get_key(NDB_SHA
 static int ndb_get_table_statistics(ha_ndbcluster*, bool, Ndb*,
                                     const NdbRecord *, struct Ndb_statistics *);
 
+THD *injector_thd= 0;
 
 // Util thread variables
 pthread_t ndb_util_thread;
@@ -6955,6 +6956,17 @@ int ha_ndbcluster::rename_table(const ch
 
   DBUG_ENTER("ha_ndbcluster::rename_table");
   DBUG_PRINT("info", ("Renaming %s to %s", from, to));
+
+  if (thd == injector_thd)
+  {
+    /*
+      Table was renamed remotely is already
+      renamed inside ndb.
+      Just rename .ndb file.
+     */
+    DBUG_RETURN(handler::rename_table(from, to));
+  }
+
   set_dbname(from, old_dbname);
   set_dbname(to, new_dbname);
   set_tabname(from);
@@ -7025,7 +7037,7 @@ int ha_ndbcluster::rename_table(const ch
     }
     ERR_RETURN(ndb_error);
   }
-  
+
   // Rename .ndb file
   if ((result= handler::rename_table(from, to)))
   {
@@ -7323,6 +7335,17 @@ int ha_ndbcluster::delete_table(const ch
   int error= 0;
   DBUG_ENTER("ha_ndbcluster::delete_table");
   DBUG_PRINT("enter", ("name: %s", name));
+
+  if (thd == injector_thd)
+  {
+    /*
+      Table was dropped remotely is already
+      dropped inside ndb.
+      Just drop local files.
+     */
+    DBUG_RETURN(handler::delete_table(name));
+  }
+
   set_dbname(name);
   set_tabname(name);
 

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2008-06-25 13:06:41 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2008-08-07 13:17:36 +0000
@@ -71,7 +71,7 @@ my_bool ndb_binlog_is_ready= FALSE;
   Has one sole purpose, for setting the in_use table member variable
   in get_share(...)
 */
-THD *injector_thd= 0;
+extern THD * injector_thd; // Declared in ha_ndbcluster.cc
 
 /*
   Global reference to ndb injector thd object.
@@ -140,12 +140,6 @@ static void ndb_free_schema_object(NDB_S
                                    bool have_lock);
 
 /*
-  Global variables for holding the ndb_binlog_index table reference
-*/
-static TABLE *ndb_binlog_index= 0;
-static TABLE_LIST binlog_tables;
-
-/*
   Helper functions
 */
 
@@ -308,15 +302,6 @@ static void run_query(THD *thd, char *bu
   thd->transaction.all= save_thd_transaction_all;
   thd->transaction.stmt= save_thd_transaction_stmt;
   thd->net= save_thd_net;
-
-  if (thd == injector_thd)
-  {
-    /*
-      running the query will close all tables, including the ndb_binlog_index
-      used in injector_thd
-    */
-    ndb_binlog_index= 0;
-  }
 }
 
 static void
@@ -1307,8 +1292,9 @@ int ndbcluster_log_schema_op(THD *thd,
       DBUG_RETURN(0);
     /* redo the drop table query as is may contain several tables */
     query= tmp_buf2;
-    query_length= (uint) (strxmov(tmp_buf2, "drop table `",
-                                  table_name, "`", NullS) - tmp_buf2);
+    query_length= (uint) (strxmov(tmp_buf2, "drop table ",
+                                  "`", db, "`", ".",
+                                  "`", table_name, "`", NullS) - tmp_buf2);
     type_str= "drop table";
     break;
   case SOT_RENAME_TABLE_PREPARE:
@@ -1318,9 +1304,11 @@ int ndbcluster_log_schema_op(THD *thd,
   case SOT_RENAME_TABLE:
     /* redo the rename table query as is may contain several tables */
     query= tmp_buf2;
-    query_length= (uint) (strxmov(tmp_buf2, "rename table `",
-                                  db, ".", table_name, "` to `",
-                                  new_db, ".", new_table_name, "`", NullS) - tmp_buf2);
+    query_length= (uint) (strxmov(tmp_buf2, "rename table ",
+                                  "`", db, "`", ".",
+                                  "`", table_name, "` to ",
+                                  "`", new_db, "`", ".",
+                                  "`", new_table_name, "`", NullS) - tmp_buf2);
     type_str= "rename table";
     break;
   case SOT_CREATE_TABLE:
@@ -1863,17 +1851,53 @@ ndb_binlog_thread_handle_schema_event(TH
       if (schema->node_id != node_id)
       {
         int log_query= 0, post_epoch_unlock= 0;
+        char errmsg[MYSQL_ERRMSG_SIZE];
+
         switch (schema_type)
         {
-        case SOT_DROP_TABLE:
-          // fall through
         case SOT_RENAME_TABLE:
           // fall through
         case SOT_RENAME_TABLE_NEW:
-          post_epoch_log_list->push_back(schema, mem_root);
-          /* acknowledge this query _after_ epoch completion */
-          post_epoch_unlock= 1;
-          break;
+        {
+          uint end= snprintf(&errmsg[0], MYSQL_ERRMSG_SIZE,
+                             "NDB Binlog: Skipping renaming locally defined table '%s.%s'
from binlog schema event '%s' from node %d. ",
+                             schema->db, schema->name, schema->query,
+                             schema->node_id);
+          
+          errmsg[end]= '\0';
+        }
+        // fall through
+        case SOT_DROP_TABLE:
+          if (schema_type == SOT_DROP_TABLE)
+          {
+            uint end= snprintf(&errmsg[0], MYSQL_ERRMSG_SIZE,
+                               "NDB Binlog: Skipping dropping locally defined table
'%s.%s' from binlog schema event '%s' from node %d. ",
+                               schema->db, schema->name, schema->query,
+                               schema->node_id);
+            errmsg[end]= '\0';
+          }
+          if (! ndbcluster_check_if_local_table(schema->db, schema->name))
+          {
+            const int no_print_error[1]=
+              {ER_BAD_TABLE_ERROR}; /* ignore missing table */
+            run_query(thd, schema->query,
+                      schema->query + schema->query_length,
+                      no_print_error, //   /* don't print error */
+                      TRUE); //  /* don't binlog the query */
+
+            /* binlog dropping table after any table operations */
+            post_epoch_log_list->push_back(schema, mem_root);
+            /* acknowledge this query _after_ epoch completion */
+            post_epoch_unlock= 1;
+          }
+          else
+          {
+            /* Tables exists as a local table, leave it */
+            DBUG_PRINT("info", ((const char *) errmsg));
+            sql_print_error((const char *) errmsg);
+            log_query= 1;
+          }
+          // Fall through
 	case SOT_TRUNCATE_TABLE:
         {
           char key[FN_REFLEN];
@@ -1909,6 +1933,8 @@ ndb_binlog_thread_handle_schema_event(TH
             free_share(&share);
           }
         }
+        if (schema_type != SOT_TRUNCATE_TABLE)
+          break;
         // fall through
         case SOT_CREATE_TABLE:
           pthread_mutex_lock(&LOCK_open);
@@ -2531,8 +2557,8 @@ struct ndb_binlog_index_row {
 /*
   Open the ndb_binlog_index table
 */
-static int open_ndb_binlog_index(THD *thd, TABLE_LIST *tables,
-                                 TABLE **ndb_binlog_index)
+static int open_and_lock_ndb_binlog_index(THD *thd, TABLE_LIST *tables,
+                                          TABLE **ndb_binlog_index)
 {
   static char repdb[]= NDB_REP_DB;
   static char reptable[]= NDB_REP_TABLE;
@@ -2544,9 +2570,8 @@ static int open_ndb_binlog_index(THD *th
   tables->lock_type= TL_WRITE;
   thd->proc_info= "Opening " NDB_REP_DB "." NDB_REP_TABLE;
   tables->required_type= FRMTYPE_TABLE;
-  uint counter;
   thd->clear_error();
-  if (open_tables(thd, &tables, &counter, MYSQL_LOCK_IGNORE_FLUSH))
+  if (simple_open_n_lock_tables(thd, tables))
   {
     if (thd->killed)
       sql_print_error("NDB Binlog: Opening ndb_binlog_index: killed");
@@ -2563,32 +2588,6 @@ static int open_ndb_binlog_index(THD *th
   return 0;
 }
 
-
-/*
-  Check if ndb_binlog_index is lockable, if not close, to free for
-  other threads use
-*/
-
-static void
-ndb_check_ndb_binlog_index(THD *thd)
-{
-  if (!ndb_binlog_index)
-    return;
-
-  bool need_reopen;
-  if (lock_tables(thd, &binlog_tables, 1, &need_reopen))
-  {
-    ndb_binlog_index= 0;
-    close_thread_tables(thd);
-    ndb_binlog_index= 0;
-    return;
-  }
-
-  mysql_unlock_tables(thd, thd->lock);
-  thd->lock= 0;
-  return;
-}
-
 /*
   Insert one row in the ndb_binlog_index
 */
@@ -2597,8 +2596,10 @@ static int
 ndb_add_ndb_binlog_index(THD *thd, ndb_binlog_index_row *row)
 {
   int error= 0;
-  bool need_reopen;
   ndb_binlog_index_row *first= row;
+  TABLE *ndb_binlog_index= 0;
+  TABLE_LIST binlog_tables;
+
   /*
     Turn of binlogging to prevent the table changes to be written to
     the binary log.
@@ -2606,28 +2607,12 @@ ndb_add_ndb_binlog_index(THD *thd, ndb_b
   ulong saved_options= thd->options;
   thd->options&= ~(OPTION_BIN_LOG);
 
-  for ( ; ; ) /* loop for need_reopen */
-  {
-    if (!ndb_binlog_index && open_ndb_binlog_index(thd, &binlog_tables,
&ndb_binlog_index))
-    {
-      error= -1;
-      goto add_ndb_binlog_index_err;
-    }
 
-    if (lock_tables(thd, &binlog_tables, 1, &need_reopen))
-    {
-      if (need_reopen)
-      {
-        TABLE_LIST *p_binlog_tables= &binlog_tables;
-        close_tables_for_reopen(thd, &p_binlog_tables);
-        ndb_binlog_index= 0;
-        continue;
-      }
-      sql_print_error("NDB Binlog: Unable to lock table ndb_binlog_index");
-      error= -1;
-      goto add_ndb_binlog_index_err;
-    }
-    break;
+  if (open_and_lock_ndb_binlog_index(thd, &binlog_tables, &ndb_binlog_index))
+  {
+    sql_print_error("NDB Binlog: Unable to lock table ndb_binlog_index");
+    error= -1;
+    goto add_ndb_binlog_index_err;
   }
 
   /*
@@ -2676,13 +2661,8 @@ ndb_add_ndb_binlog_index(THD *thd, ndb_b
     }
   } while (row);
 
-  mysql_unlock_tables(thd, thd->lock);
-  thd->lock= 0;
-  thd->options= saved_options;
-  return 0;
 add_ndb_binlog_index_err:
   close_thread_tables(thd);
-  ndb_binlog_index= 0;
   thd->options= saved_options;
   return error;
 }
@@ -5228,15 +5208,6 @@ restart:
          !ndb_binlog_running))
       break; /* Shutting down server */
 
-    if (ndb_binlog_index && ndb_binlog_index->s->version <
refresh_version)
-    {
-      if (ndb_binlog_index->s->version < refresh_version)
-      {
-        close_thread_tables(thd);
-        ndb_binlog_index= 0;
-      }
-    }
-
     MEM_ROOT **root_ptr=
       my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC);
     MEM_ROOT *old_root= *root_ptr;
@@ -5294,17 +5265,8 @@ restart:
       }
     }
 
-    /*
-      For each epoch atleast one check should be made to see if ndb_binlog_index
-      table is lockable.  Variable 'do_check_ndb_binlog_index' is used as a flag
-      to signal if a check is needed for current epoch.
-    */
-    int do_check_ndb_binlog_index= 1;
-
     if (res > 0)
     {
-      do_check_ndb_binlog_index= 1;
-
       DBUG_PRINT("info", ("pollEvents res: %d", res));
       thd->proc_info= "Processing events";
       NdbEventOperation *pOp= i_ndb->nextEvent();
@@ -5577,19 +5539,12 @@ restart:
           if (ndb_update_ndb_binlog_index)
           {
             ndb_add_ndb_binlog_index(thd, rows);
-            do_check_ndb_binlog_index= 0;
           }
           ndb_latest_applied_binlog_epoch= gci;
           break;
         }
         ndb_latest_handled_binlog_epoch= gci;
 
-        if (do_check_ndb_binlog_index)
-        {
-          ndb_check_ndb_binlog_index(thd);
-          do_check_ndb_binlog_index= 0;
-        }
-
 #ifdef RUN_NDB_BINLOG_TIMER
         gci_timer.stop();
         sql_print_information("gci %ld event_count %d write time "
@@ -5622,25 +5577,16 @@ restart:
     free_root(&mem_root, MYF(0));
     *root_ptr= old_root;
     ndb_latest_handled_binlog_epoch= ndb_latest_received_binlog_epoch;
-
-    if (do_check_ndb_binlog_index)
-    {
-      ndb_check_ndb_binlog_index(thd);
-      do_check_ndb_binlog_index= 0;
-    }
   }
   if (do_ndbcluster_binlog_close_connection == BCCC_restart)
   {
     ndb_binlog_tables_inited= FALSE;
-    close_thread_tables(thd);
-    ndb_binlog_index= 0;
     goto restart;
   }
 err:
   sql_print_information("Stopping Cluster Binlog");
   DBUG_PRINT("info",("Shutting down cluster binlog thread"));
   thd->proc_info= "Shutting down";
-  close_thread_tables(thd);
   pthread_mutex_lock(&injector_mutex);
   /* don't mess with the injector_ndb anymore from other threads */
   injector_thd= 0;

=== modified file 'storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp	2008-08-07 01:34:35 +0000
+++ b/storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp	2008-08-07 06:24:52 +0000
@@ -307,16 +307,18 @@ private:
 inline
 int
 NdbIndexScanOperation::setBound(const char* attr, int type, const void* value,
-                                __attribute__((__unused__))Uint32 len)
+                                Uint32 len)
 {
+  (void)len;  // unused
   return setBound(attr, type, value);
 }
 
 inline
 int
 NdbIndexScanOperation::setBound(Uint32 anAttrId, int type, const void* value,
-                                __attribute__((__unused__))Uint32 len)
+                                Uint32 len)
 {
+  (void)len;  // unused
   return setBound(anAttrId, type, value);
 }
 

=== modified file 'storage/ndb/include/ndbapi/NdbOperation.hpp'
--- a/storage/ndb/include/ndbapi/NdbOperation.hpp	2008-08-07 01:42:03 +0000
+++ b/storage/ndb/include/ndbapi/NdbOperation.hpp	2008-08-07 13:17:36 +0000
@@ -1580,8 +1580,9 @@ NdbOperation::NdbCon(NdbTransaction* aNd
 inline
 int
 NdbOperation::equal(const char* anAttrName, const char* aValue,
-                    __attribute__((__unused__))Uint32 len)
+                    Uint32 len)
 {
+  (void)len;   // unused
   return equal(anAttrName, aValue);
 }
 
@@ -1616,8 +1617,9 @@ NdbOperation::equal(const char* anAttrNa
 inline
 int
 NdbOperation::equal(Uint32 anAttrId, const char* aValue,
-                    __attribute__((__unused__))Uint32 len)
+                    Uint32 len)
 {
+  (void)len;   // unused
   return equal(anAttrId, aValue);
 }
 
@@ -1652,8 +1654,9 @@ NdbOperation::equal(Uint32 anAttrId, Uin
 inline
 int
 NdbOperation::setValue(const char* anAttrName, const char* aValue,
-                       __attribute__((__unused__))Uint32 len)
+                       Uint32 len)
 {
+  (void)len;   // unused
   return setValue(anAttrName, aValue);
 }
 
@@ -1702,8 +1705,9 @@ NdbOperation::setValue(const char* anAtt
 inline
 int
 NdbOperation::setValue(Uint32 anAttrId, const char* aValue,
-                       __attribute__((__unused__))Uint32 len)
+                       Uint32 len)
 {
+  (void)len;   // unused
   return setValue(anAttrId, aValue);
 }
 

=== modified file 'storage/ndb/include/ndbapi/NdbTransaction.hpp'
--- a/storage/ndb/include/ndbapi/NdbTransaction.hpp	2008-08-07 01:34:35 +0000
+++ b/storage/ndb/include/ndbapi/NdbTransaction.hpp	2008-08-07 06:24:52 +0000
@@ -1091,8 +1091,9 @@ NdbTransaction::get_send_size()
 
 inline
 void
-NdbTransaction::set_send_size(__attribute__((__unused__))Uint32 send_size)
+NdbTransaction::set_send_size(Uint32 send_size)
 {
+  (void)send_size; //unused
   return;
 }
 

Thread
bzr commit into mysql-5.1-telco-6.4 branch (jonas:2670) jonas7 Aug