diff options
author | unknown <lenz@mysql.com> | 2005-06-20 13:18:48 +0200 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2005-06-20 13:18:48 +0200 |
commit | dca7c50e519e2b5bb89164799df87158117560f0 (patch) | |
tree | 53a8cfd7099ee2517bf1a6449dde8dd7fafdd8d0 | |
parent | c46b78da5517c59a99b5a321a2c3fdbfbcb4de46 (diff) | |
parent | 2aa1a04c631e4ba1306d09a864c97fcc5b3949fd (diff) | |
download | mariadb-git-dca7c50e519e2b5bb89164799df87158117560f0.tar.gz |
Merge lgrimmer@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/my/mysql-4.1
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 15 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 33 |
2 files changed, 18 insertions, 30 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3f7ba38d83d..6151dd68160 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -445,9 +445,9 @@ sub command_line_setup () { # These are defaults for things that are set on the command line $opt_suite= "main"; # Special default suite - my $opt_master_myport= 9306; - my $opt_slave_myport= 9308; - $opt_ndbcluster_port= 9350; + my $opt_master_myport= 9306; + my $opt_slave_myport= 9308; + $opt_ndbcluster_port= 9350; # Read the command line # Note: Keep list, and the order, in sync with usage at end of this file @@ -458,7 +458,7 @@ sub command_line_setup () { 'ps-protocol' => \$opt_ps_protocol, 'bench' => \$opt_bench, 'small-bench' => \$opt_small_bench, - 'no-manager' => \$opt_no_manager, + 'no-manager' => \$opt_no_manager, # Currently not used # Control what test suites or cases to run 'force' => \$opt_force, @@ -472,7 +472,7 @@ sub command_line_setup () { 'master_port=i' => \$opt_master_myport, 'slave_port=i' => \$opt_slave_myport, 'ndbcluster_port=i' => \$opt_ndbcluster_port, - 'manager-port' => \$opt_manager_port, + 'manager-port=i' => \$opt_manager_port, # Currently not used # Test case authoring 'record' => \$opt_record, @@ -840,7 +840,7 @@ sub executable_setup () { $exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog"; $exe_mysqladmin= "$path_client_bindir/mysqladmin"; $exe_mysql= "$path_client_bindir/mysql"; - $exe_mysql_fix_system_tables= "$path_client_bindir/scripts/mysql_fix_privilege_tables"; + $exe_mysql_fix_system_tables= "$path_client_bindir/mysql_fix_privilege_tables"; if ( -d "$glob_basedir/share/mysql/english" ) { @@ -2219,7 +2219,8 @@ Options that specify ports master_port=PORT Specify the port number used by the first master slave_port=PORT Specify the port number used by the first slave - ndbcluster_port=i Specify the port number used by cluster FIXME + ndbcluster_port=PORT Specify the port number used by cluster + manager-port=PORT Specify the port number used by manager (currently not used) Options for test case authoring diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index a0080af1dfb..5ceab51fbe1 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -464,13 +464,12 @@ bool ha_ndbcluster::get_error_message(int error, } +#ifndef DBUG_OFF /* Check if type is supported by NDB. - TODO Use this once in open(), not in every operation - */ -static inline bool ndb_supported_type(enum_field_types type) +static bool ndb_supported_type(enum_field_types type) { switch (type) { case MYSQL_TYPE_DECIMAL: @@ -502,6 +501,7 @@ static inline bool ndb_supported_type(enum_field_types type) } return FALSE; } +#endif /* !DBUG_OFF */ /* @@ -531,15 +531,10 @@ int ha_ndbcluster::set_ndb_key(NdbOperation *ndb_op, Field *field, pack_len)); DBUG_DUMP("key", (char*)field_ptr, pack_len); - if (ndb_supported_type(field->type())) - { - if (! (field->flags & BLOB_FLAG)) - // Common implementation for most field types - DBUG_RETURN(ndb_op->equal(fieldnr, (char*) field_ptr, pack_len) != 0); - } - // Unhandled field types - DBUG_PRINT("error", ("Field type %d not supported", field->type())); - DBUG_RETURN(2); + DBUG_ASSERT(ndb_supported_type(field->type())); + DBUG_ASSERT(! (field->flags & BLOB_FLAG)); + // Common implementation for most field types + DBUG_RETURN(ndb_op->equal(fieldnr, (char*) field_ptr, pack_len) != 0); } @@ -558,7 +553,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, pack_len, field->is_null()?"Y":"N")); DBUG_DUMP("value", (char*) field_ptr, pack_len); - if (ndb_supported_type(field->type())) + DBUG_ASSERT(ndb_supported_type(field->type())); { // ndb currently does not support size 0 const byte *empty_field= ""; @@ -607,9 +602,6 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, } DBUG_RETURN(1); } - // Unhandled field types - DBUG_PRINT("error", ("Field type %d not supported", field->type())); - DBUG_RETURN(2); } @@ -704,9 +696,8 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field, if (field != NULL) { - DBUG_ASSERT(buf); - if (ndb_supported_type(field->type())) - { + DBUG_ASSERT(buf); + DBUG_ASSERT(ndb_supported_type(field->type())); DBUG_ASSERT(field->ptr != NULL); if (! (field->flags & BLOB_FLAG)) { @@ -730,10 +721,6 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field, DBUG_RETURN(ndb_blob->setActiveHook(g_get_ndb_blobs_value, arg) != 0); } DBUG_RETURN(1); - } - // Unhandled field types - DBUG_PRINT("error", ("Field type %d not supported", field->type())); - DBUG_RETURN(2); } // Used for hidden key only |