List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:June 13 2012 6:14pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4941 to 4942)
View as plain text  
 4942 magnus.blaudd@stripped	2012-06-13 [merge]
      Merge

    renamed:
      mysql-test/include/rpl_multi_engine2.inc => mysql-test/suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc
    modified:
      mysql-test/suite/ndb/r/ndb_alter_table_online.result
      mysql-test/suite/ndb/r/ndb_basic.result
      mysql-test/suite/ndb/t/ndb_alter_table_online.test
      mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_advance.result
      mysql-test/suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc
      mysql-test/suite/ndb_rpl/t/ndb_rpl_dd_advance.test
      sql/ha_ndbcluster.cc
      storage/ndb/include/ndb_version.h.in
      storage/ndb/src/common/util/version.cpp
 4941 Craig L Russell	2012-06-13
      Fix stray backtick

    modified:
      storage/ndb/include/ndbapi/NdbScanOperation.hpp
=== modified file 'mysql-test/suite/ndb/r/ndb_alter_table_online.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2012-03-19 09:44:55 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_online.result	2012-06-08 07:53:18 +0000
@@ -266,7 +266,7 @@ ndb_show_tables completed.....
 select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%';
 name
 't1'
-ALTER TABLE t1 ADD c TIMESTAMP;
+ALTER TABLE t1 ADD c TIMESTAMP DEFAULT 0;
 INSERT INTO t1 values (2,2,'2007-09-19 18:46:02');
 SELECT * FROM t1 ORDER BY a;
 a	b	c

=== modified file 'mysql-test/suite/ndb/r/ndb_basic.result'
--- a/mysql-test/suite/ndb/r/ndb_basic.result	2012-03-21 06:28:31 +0000
+++ b/mysql-test/suite/ndb/r/ndb_basic.result	2012-06-11 10:23:01 +0000
@@ -131,6 +131,8 @@ ndb_table_temporary	#
 ndb_use_copying_alter_table	#
 ndb_use_exact_count	#
 ndb_use_transactions	#
+ndb_version	#
+ndb_version_string	#
 ndb_wait_connected	#
 ndb_wait_setup	#
 CREATE TABLE t1 (

=== modified file 'mysql-test/suite/ndb/t/ndb_alter_table_online.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2012-03-19 09:44:55 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_online.test	2012-06-08 07:53:18 +0000
@@ -234,7 +234,7 @@ ALTER ONLINE TABLE t1 ADD c TIMESTAMP;
 --source ndb_show_tables_result.inc
 select name from ndb_show_tables_results where id = @t1_id and name like '%t1%' and type like '%UserTable%';
 
-ALTER TABLE t1 ADD c TIMESTAMP;
+ALTER TABLE t1 ADD c TIMESTAMP DEFAULT 0;
 
 INSERT INTO t1 values (2,2,'2007-09-19 18:46:02');
 SELECT * FROM t1 ORDER BY a;

=== modified file 'mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_advance.result'
--- a/mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_advance.result	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/r/ndb_rpl_dd_advance.result	2012-06-12 16:10:00 +0000
@@ -143,9 +143,9 @@ SELECT * FROM t1 ORDER BY c1 LIMIT 5;
 c1	c2	c3	c5
 1	2.00	b1b1b1b1b1b1b1b1b1b1	NULL
 2	4.00	b1b1b1b1b1b1b1b1b1b1	NULL
-3	6.00	0000-00-00 00:00:00	NULL
-4	8.00	0000-00-00 00:00:00	NULL
-5	10.00	0000-00-00 00:00:00	NULL
+3	6.00	<c4_timestamp_value>	NULL
+4	8.00	<c4_timestamp_value>	NULL
+5	10.00	<c4_timestamp_value>	NULL
 **** Show last set of ALTERs on SLAVE ****
 SHOW CREATE TABLE t1;
 Table	Create Table
@@ -162,9 +162,9 @@ SELECT * FROM t1 ORDER BY c1 LIMIT 5;
 c1	c2	c3	c5
 1	2.00	b1b1b1b1b1b1b1b1b1b1	NULL
 2	4.00	b1b1b1b1b1b1b1b1b1b1	NULL
-3	6.00	0000-00-00 00:00:00	NULL
-4	8.00	0000-00-00 00:00:00	NULL
-5	10.00	0000-00-00 00:00:00	NULL
+3	6.00	<c4_timestamp_value>	NULL
+4	8.00	<c4_timestamp_value>	NULL
+5	10.00	<c4_timestamp_value>	NULL
 SELECT * FROM t1 where c1 = 1;
 c1	c2	c3	c5
 1	2.00	b1b1b1b1b1b1b1b1b1b1	NULL

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_2multi_basic.inc	2012-06-12 18:23:54 +0000
@@ -38,7 +38,7 @@ SHOW CREATE TABLE t1;
 sync_slave_with_master;
 SHOW CREATE TABLE t1;
 
---source include/rpl_multi_engine2.inc
+--source suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc
 
 #################################################
 # Okay lets see how it holds up to table changes
@@ -58,7 +58,7 @@ SHOW CREATE TABLE t1;
 sync_slave_with_master;
 SHOW CREATE TABLE t1;
 
---source include/rpl_multi_engine2.inc
+--source suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc
 
 #################################################
 --echo --- Check that replication works when slave has more columns than master
@@ -89,7 +89,7 @@ SELECT * 
 FROM t1
 ORDER BY id;
 
---source include/rpl_multi_engine2.inc
+--source suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc
 TRUNCATE TABLE t1;
 
 #################################################
@@ -107,7 +107,7 @@ ALTER TABLE t1 DROP COLUMN y;
 
 SHOW CREATE TABLE t1;
 
---source include/rpl_multi_engine2.inc
+--source suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc
 TRUNCATE TABLE t1;
 
 #################################################

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_dd_advance.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_dd_advance.test	2011-05-13 07:40:50 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_dd_advance.test	2012-06-12 16:10:00 +0000
@@ -91,6 +91,8 @@ CREATE INDEX t1_i ON t1(c2, c3);
 #Bug 18039
 CREATE UNIQUE INDEX t1_i2 ON t1(c2);
 ALTER TABLE t1 ADD c4 TIMESTAMP;
+# Save the TIMESTAMP value of c4 for later masking of .result file
+let $c4_timestamp_value=`select c4 FROM t1 WHERE c1 = 1`;
 ALTER TABLE t1 ADD c5 DOUBLE;
 ALTER TABLE t1 ADD INDEX (c5);  
 SHOW CREATE TABLE t1;
@@ -154,12 +156,14 @@ UPDATE t1 SET c3=@b1 where c1 = 2;
 --echo **** Show last set of ALTERs on MASTER ****
 
 SHOW CREATE TABLE t1;
+--replace_result $c4_timestamp_value <c4_timestamp_value>
 SELECT * FROM t1 ORDER BY c1 LIMIT 5;
 
 --echo **** Show last set of ALTERs on SLAVE ****
 --sync_slave_with_master
 connection slave;
 SHOW CREATE TABLE t1;
+--replace_result $c4_timestamp_value <c4_timestamp_value>
 # Bug 18094
 SELECT * FROM t1 ORDER BY c1 LIMIT 5;
 SELECT * FROM t1 where c1 = 1;

=== renamed file 'mysql-test/include/rpl_multi_engine2.inc' => 'mysql-test/suite/ndb_rpl/t/ndb_rpl_multi_engine2.inc'
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2012-06-07 09:06:47 +0000
+++ b/sql/ha_ndbcluster.cc	2012-06-13 17:40:40 +0000
@@ -31,7 +31,6 @@
 #include "ha_ndbcluster.h"
 #include <ndbapi/NdbApi.hpp>
 #include "ha_ndbcluster_cond.h"
-#include <util/Bitmask.hpp>
 #include <ndbapi/NdbIndexStat.hpp>
 #include <ndbapi/NdbInterpretedCode.hpp>
 
@@ -7275,23 +7274,6 @@ int ha_ndbcluster::start_statement(THD *
     else if (thd->slave_thread)
       thd_ndb->m_slow_path= TRUE;
   }
-  /*
-    If this is the start of a LOCK TABLE, a table look 
-    should be taken on the table in NDB
-       
-    Check if it should be read or write lock
-  */
-  if (thd_options(thd) & (OPTION_TABLE_LOCK))
-  {
-    /* This is currently dead code in wait for implementation in NDB */
-    /* lockThisTable(); */
-    DBUG_PRINT("info", ("Locking the table..." ));
-#ifdef NOT_YET
-    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
-                        ER_GET_ERRMSG, ER(ER_GET_ERRMSG), 0,
-                        "Table only locked locally in this mysqld", "NDB");
-#endif
-  }
   DBUG_RETURN(0);
 }
 
@@ -11717,6 +11699,34 @@ static int ndb_wait_setup_func_impl(ulon
 
 int(*ndb_wait_setup_func)(ulong) = 0;
 #endif
+
+/* Version in composite numerical format */
+static Uint32 ndb_version = NDB_VERSION_D;
+static MYSQL_SYSVAR_UINT(
+  version,                          /* name */
+  ndb_version,                      /* var */
+  PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
+  "Compile version for ndbcluster",
+  NULL,                             /* check func. */
+  NULL,                             /* update func. */
+  0,                                /* default */
+  0,                                /* min */
+  0,                                /* max */
+  0                                 /* block */
+);
+
+/* Version in ndb-Y.Y.Y[-status] format */
+static char* ndb_version_string = (char*)NDB_NDB_VERSION_STRING;
+static MYSQL_SYSVAR_STR(
+  version_string,                  /* name */
+  ndb_version_string,              /* var */
+  PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
+  "Compile version string for ndbcluster",
+  NULL,                             /* check func. */
+  NULL,                             /* update func. */
+  NULL                              /* default */
+);
+
 extern int ndb_dictionary_is_mysqld;
 
 static int ndbcluster_init(void *p)
@@ -16792,6 +16802,8 @@ static struct st_mysql_sys_var* system_v
 #ifndef DBUG_OFF
   MYSQL_SYSVAR(dbg_check_shares),
 #endif
+  MYSQL_SYSVAR(version),
+  MYSQL_SYSVAR(version_string),
   NULL
 };
 

=== modified file 'storage/ndb/include/ndb_version.h.in'
--- a/storage/ndb/include/ndb_version.h.in	2012-02-03 12:30:24 +0000
+++ b/storage/ndb/include/ndb_version.h.in	2012-06-11 10:23:01 +0000
@@ -27,6 +27,13 @@
 */
 #define NDB_MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8)  | ((C) << 0))
 
+/*
+  Creates a stringified version from major, minor and build
+  ex: NDB_MAKE_STRING_VERSION(7,0,22) => "7.0.22"
+*/
+#define NDB_MAKE_QUOTED_VERSION(A,B,C) #A "." #B "." #C
+#define NDB_MAKE_STRING_VERSION(A,B,C) NDB_MAKE_QUOTED_VERSION(A,B,C)
+
 /* NDB version numbers and status  */
 #define NDB_VERSION_MAJOR @NDB_VERSION_MAJOR@
 #define NDB_VERSION_MINOR @NDB_VERSION_MINOR@
@@ -37,6 +44,12 @@
 #define NDB_VERSION_D \
   NDB_MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD)
 
+/* Version string for NDB, ex: "ndb-7.0.22" */
+#define NDB_NDB_VERSION_STRING \
+  "ndb-" NDB_MAKE_STRING_VERSION(NDB_VERSION_MAJOR, \
+                                 NDB_VERSION_MINOR, \
+                                 NDB_VERSION_BUILD) NDB_VERSION_STATUS
+
 /*
   The version number of the MySQL Server that NDB is built
   with. Extracted from MYSQL_VERSION_ID

=== modified file 'storage/ndb/src/common/util/version.cpp'
--- a/storage/ndb/src/common/util/version.cpp	2012-04-10 13:58:06 +0000
+++ b/storage/ndb/src/common/util/version.cpp	2012-06-11 10:23:01 +0000
@@ -330,6 +330,8 @@ TAPTEST(ndb_version)
   printf(" NDB_VERSION_MINOR: %d\n", NDB_VERSION_MINOR);
   printf(" NDB_VERSION_BUILD: %d\n", NDB_VERSION_BUILD);
   printf(" NDB_VERSION_STATUS: '%s'\n\n", NDB_VERSION_STATUS);
+  printf(" NDB_VERSION_STRING: '%s'\n", NDB_VERSION_STRING);
+  printf(" NDB_NDB_VERSION_STRING: '%s'\n\n", NDB_NDB_VERSION_STRING);
 
   /*
     Parse the VERSION string as X.X.X-status */
@@ -422,6 +424,7 @@ TAPTEST(ndb_version)
   /* ndbGetOwnVersionString */
   printf("ndbGetOwnVersionString: '%s'\n",
          ndbGetOwnVersionString());
+  OK(strcmp(NDB_VERSION_STRING, ndbGetOwnVersionString()) == 0); // should match
 
   /* ndbGetOwnVersion */
   OK(ndbGetOwnVersion() == ndbMakeVersion(NDB_VERSION_MAJOR,

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:4941 to 4942) magnus.blaudd14 Jun