Commit 2d5711b8 authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-clean
parents f3e20188 4ba04a3d
...@@ -125,6 +125,10 @@ static TYPELIB command_typelib= ...@@ -125,6 +125,10 @@ static TYPELIB command_typelib=
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
#ifdef __NETWARE__
{"autoclose", 'a', " Auto close the screen on exit for NetWare",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"count", 'c', {"count", 'c',
"Number of iterations to make. This works with -i (--sleep) only.", "Number of iterations to make. This works with -i (--sleep) only.",
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT, (gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT,
...@@ -218,6 +222,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -218,6 +222,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int error = 0; int error = 0;
switch(optid) { switch(optid) {
#ifdef __NETWARE__
case 'a':
setscreenmode(SCR_AUTOCLOSE_ON_EXIT); // auto close the screen /
break;
#endif
case 'c': case 'c':
opt_count_iterations= 1; opt_count_iterations= 1;
break; break;
......
...@@ -574,3 +574,39 @@ uid gid rid cid ...@@ -574,3 +574,39 @@ uid gid rid cid
1 1 2 3 1 1 2 3
1 1 2 4 1 1 2 4
drop table t1,t2,t3,t4,t5,t6,t7; drop table t1,t2,t3,t4,t5,t6,t7;
CREATE TABLE t1 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned,
c int unsigned,
UNIQUE bc(b,c) ) engine = ndb;
insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
select * from t1 where b=1 and c=1;
a b c
1 1 1
select * from t1 where b is null and c is null;
a b c
3 NULL NULL
select * from t1 where b is null and c = 2;
a b c
2 NULL 2
select * from t1 where b = 4 and c is null;
a b c
4 4 NULL
create table t8 as
select * from t1 where (b = 1 and c = 1)
or (b is null and c is null)
or (b is null and c = 2)
or (b = 4 and c is null);
select * from t8 order by a;
a b c
1 1 1
2 NULL 2
3 NULL NULL
4 4 NULL
select * from t1 order by a;
a b c
1 1 1
2 NULL 2
3 NULL NULL
4 4 NULL
drop table t1, t8;
...@@ -265,4 +265,24 @@ select * from t4 where rid = 2 order by cid; ...@@ -265,4 +265,24 @@ select * from t4 where rid = 2 order by cid;
drop table t1,t2,t3,t4,t5,t6,t7; drop table t1,t2,t3,t4,t5,t6,t7;
# test null in indexes
CREATE TABLE t1 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned,
c int unsigned,
UNIQUE bc(b,c) ) engine = ndb;
insert into t1 values(1,1,1),(2,NULL,2),(3,NULL,NULL),(4,4,NULL);
select * from t1 where b=1 and c=1;
select * from t1 where b is null and c is null;
select * from t1 where b is null and c = 2;
select * from t1 where b = 4 and c is null;
create table t8 as
select * from t1 where (b = 1 and c = 1)
or (b is null and c is null)
or (b is null and c = 2)
or (b = 4 and c is null);
select * from t8 order by a;
select * from t1 order by a;
drop table t1, t8;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Error File Compiler # MySQL Error File Compiler
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error File Compiler" DESCRIPTION "MySQL Error File Compiler"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL ISAM Table Check Tool" SCREENNAME "MySQL ISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Check Tool" DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# ISAM Log # ISAM Log
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Log Tool" DESCRIPTION "MySQL ISAM Table Log Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
EXPORT @libmysql.imp EXPORT @libmysql.imp
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Client Library" DESCRIPTION "MySQL Client Library"
VERSION 4, 0 VERSION 4, 0
AUTOUNLOAD AUTOUNLOAD
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# My Print Defaults # My Print Defaults
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Print Defaults Tool" DESCRIPTION "MySQL Print Defaults Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Dump Tool" SCREENNAME "MySQL MyISAM Table Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Dump Tool" DESCRIPTION "MySQL MyISAM Table Dump Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Check Tool" SCREENNAME "MySQL MyISAM Table Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Check Tool" DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Log Tool" SCREENNAME "MySQL MyISAM Table Log Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool" DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL MyISAM Table Pack Tool" SCREENNAME "MySQL MyISAM Table Pack Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool" DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Monitor" SCREENNAME "MySQL Monitor"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Monitor" DESCRIPTION "MySQL Monitor"
VERSION 4, 0 VERSION 4, 0
MULTIPLE MULTIPLE
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# My Print Defaults # My Print Defaults
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Install Tool" DESCRIPTION "MySQL Install Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Install" SCREENNAME "MySQL Install"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Initial Database Installer" DESCRIPTION "MySQL Initial Database Installer"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
MODULE libc.nlm MODULE libc.nlm
STACKSIZE 65536 STACKSIZE 65536
SCREENNAME "MySQL Test Run" SCREENNAME "MySQL Test Run"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Run" DESCRIPTION "MySQL Test Run"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
#SCREENNAME "MySQL Tool - Wait for a Program to Terminate" #SCREENNAME "MySQL Tool - Wait for a Program to Terminate"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Tool - Wait for a Program to Terminate" DESCRIPTION "MySQL Tool - Wait for a Program to Terminate"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Admin" SCREENNAME "MySQL Admin"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool" DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Binary Log Dump Tool" SCREENNAME "MySQL Binary Log Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool" DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Check Tool" SCREENNAME "MySQL Check Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool" DESCRIPTION "MySQL Check Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Server # MySQL Server
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server" DESCRIPTION "MySQL Database Server"
VERSION 4, 0 VERSION 4, 0
MULTIPLE MULTIPLE
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Database Server" SCREENNAME "MySQL Database Server"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server Monitor" DESCRIPTION "MySQL Database Server Monitor"
VERSION 4, 0 VERSION 4, 0
MULTIPLE MULTIPLE
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Dump Tool" SCREENNAME "MySQL Dump Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool" DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Import" SCREENNAME "MySQL Import"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool" DESCRIPTION "MySQL Import Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
SCREENNAME "MySQL Show" SCREENNAME "MySQL Show"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool" DESCRIPTION "MySQL Show Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# MySQL Admin # MySQL Admin
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Case Tool" DESCRIPTION "MySQL Test Case Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Pack ISAM # Pack ISAM
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Pack Tool" DESCRIPTION "MySQL ISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# PERROR # PERROR
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error Code Description Tool" DESCRIPTION "MySQL Error Code Description Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Replace # Replace
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Text Replacement Tool" DESCRIPTION "MySQL Text Replacement Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
#SCREENNAME "MySQL Stack Dump Resolve Tool" #SCREENNAME "MySQL Stack Dump Resolve Tool"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Stack Dump Resolve Tool" DESCRIPTION "MySQL Stack Dump Resolve Tool"
VERSION 4, 0 VERSION 4, 0
STACKSIZE 65536 STACKSIZE 65536
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Resolve IP # Resolve IP
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL IP/Hostname Resolve Tool" DESCRIPTION "MySQL IP/Hostname Resolve Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
......
...@@ -1197,9 +1197,10 @@ int ha_ndbcluster::unique_index_read(const byte *key, ...@@ -1197,9 +1197,10 @@ int ha_ndbcluster::unique_index_read(const byte *key,
for (i= 0; key_part != end; key_part++, i++) for (i= 0; key_part != end; key_part++, i++)
{ {
if (set_ndb_key(op, key_part->field, i, key_ptr)) if (set_ndb_key(op, key_part->field, i,
key_part->null_bit ? key_ptr + 1 : key_ptr))
ERR_RETURN(trans->getNdbError()); ERR_RETURN(trans->getNdbError());
key_ptr+= key_part->length; key_ptr+= key_part->store_length;
} }
// Get non-index attribute(s) // Get non-index attribute(s)
...@@ -2287,6 +2288,28 @@ int ha_ndbcluster::index_end() ...@@ -2287,6 +2288,28 @@ int ha_ndbcluster::index_end()
DBUG_RETURN(close_scan()); DBUG_RETURN(close_scan());
} }
/**
* Check if key contains null
*/
static
int
check_null_in_key(const KEY* key_info, const byte *key, uint key_len)
{
KEY_PART_INFO *curr_part, *end_part;
const byte* end_ptr = key + key_len;
curr_part= key_info->key_part;
end_part= curr_part + key_info->key_parts;
for (; curr_part != end_part && key < end_ptr; curr_part++)
{
if(curr_part->null_bit && *key)
return 1;
key += curr_part->store_length;
}
return 0;
}
int ha_ndbcluster::index_read(byte *buf, int ha_ndbcluster::index_read(byte *buf,
const byte *key, uint key_len, const byte *key, uint key_len,
...@@ -2304,6 +2327,8 @@ int ha_ndbcluster::index_read(byte *buf, ...@@ -2304,6 +2327,8 @@ int ha_ndbcluster::index_read(byte *buf,
case PRIMARY_KEY_INDEX: case PRIMARY_KEY_INDEX:
if (find_flag == HA_READ_KEY_EXACT && key_info->key_length == key_len) if (find_flag == HA_READ_KEY_EXACT && key_info->key_length == key_len)
{ {
if(m_active_cursor && (error= close_scan()))
DBUG_RETURN(error);
DBUG_RETURN(pk_read(key, key_len, buf)); DBUG_RETURN(pk_read(key, key_len, buf));
} }
else if (type == PRIMARY_KEY_INDEX) else if (type == PRIMARY_KEY_INDEX)
...@@ -2313,8 +2338,11 @@ int ha_ndbcluster::index_read(byte *buf, ...@@ -2313,8 +2338,11 @@ int ha_ndbcluster::index_read(byte *buf,
break; break;
case UNIQUE_ORDERED_INDEX: case UNIQUE_ORDERED_INDEX:
case UNIQUE_INDEX: case UNIQUE_INDEX:
if (find_flag == HA_READ_KEY_EXACT && key_info->key_length == key_len) if (find_flag == HA_READ_KEY_EXACT && key_info->key_length == key_len &&
!check_null_in_key(key_info, key, key_len))
{ {
if(m_active_cursor && (error= close_scan()))
DBUG_RETURN(error);
DBUG_RETURN(unique_index_read(key, key_len, buf)); DBUG_RETURN(unique_index_read(key, key_len, buf));
} }
else if (type == UNIQUE_INDEX) else if (type == UNIQUE_INDEX)
...@@ -2418,6 +2446,8 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key, ...@@ -2418,6 +2446,8 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key,
start_key->length == key_info->key_length && start_key->length == key_info->key_length &&
start_key->flag == HA_READ_KEY_EXACT) start_key->flag == HA_READ_KEY_EXACT)
{ {
if(m_active_cursor && (error= close_scan()))
DBUG_RETURN(error);
error= pk_read(start_key->key, start_key->length, buf); error= pk_read(start_key->key, start_key->length, buf);
DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error); DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error);
} }
...@@ -2425,10 +2455,12 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key, ...@@ -2425,10 +2455,12 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key,
case UNIQUE_ORDERED_INDEX: case UNIQUE_ORDERED_INDEX:
case UNIQUE_INDEX: case UNIQUE_INDEX:
key_info= table->key_info + active_index; key_info= table->key_info + active_index;
if (start_key && if (start_key && start_key->length == key_info->key_length &&
start_key->length == key_info->key_length && start_key->flag == HA_READ_KEY_EXACT &&
start_key->flag == HA_READ_KEY_EXACT) !check_null_in_key(key_info, start_key->key, start_key->length))
{ {
if(m_active_cursor && (error= close_scan()))
DBUG_RETURN(error);
error= unique_index_read(start_key->key, start_key->length, buf); error= unique_index_read(start_key->key, start_key->length, buf);
DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error); DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error);
} }
......
...@@ -146,6 +146,7 @@ static VolumeID_t datavolid; ...@@ -146,6 +146,7 @@ static VolumeID_t datavolid;
static event_handle_t eh; static event_handle_t eh;
static Report_t ref; static Report_t ref;
static void *refneb= NULL; static void *refneb= NULL;
my_bool event_flag= FALSE;
static int volumeid= -1; static int volumeid= -1;
/* NEB event callback */ /* NEB event callback */
...@@ -815,6 +816,7 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -815,6 +816,7 @@ static void __cdecl kill_server(int sig_ptr)
else else
unireg_end(); unireg_end();
#ifdef __NETWARE__ #ifdef __NETWARE__
if (!event_flag)
pthread_join(select_thread, NULL); // wait for main thread pthread_join(select_thread, NULL); // wait for main thread
#endif /* __NETWARE__ */ #endif /* __NETWARE__ */
...@@ -1525,6 +1527,7 @@ static void check_data_home(const char *path) ...@@ -1525,6 +1527,7 @@ static void check_data_home(const char *path)
// down server event callback // down server event callback
void mysql_down_server_cb(void *, void *) void mysql_down_server_cb(void *, void *)
{ {
event_flag = TRUE;
kill_server(0); kill_server(0);
} }
...@@ -1534,7 +1537,6 @@ void mysql_cb_destroy(void *) ...@@ -1534,7 +1537,6 @@ void mysql_cb_destroy(void *)
{ {
UnRegisterEventNotification(eh); // cleanup down event notification UnRegisterEventNotification(eh); // cleanup down event notification
NX_UNWRAP_INTERFACE(ref); NX_UNWRAP_INTERFACE(ref);
/* Deregister NSS volume deactivation event */ /* Deregister NSS volume deactivation event */
NX_UNWRAP_INTERFACE(refneb); NX_UNWRAP_INTERFACE(refneb);
if (neb_consumer_id) if (neb_consumer_id)
...@@ -1558,7 +1560,7 @@ void mysql_cb_init() ...@@ -1558,7 +1560,7 @@ void mysql_cb_init()
Register for volume deactivation event Register for volume deactivation event
Wrap the callback function, as it is called by non-LibC thread Wrap the callback function, as it is called by non-LibC thread
*/ */
(void)NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb); (void *) NX_WRAP_INTERFACE(neb_event_callback, 1, &refneb);
registerwithneb(); registerwithneb();
NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up NXVmRegisterExitHandler(mysql_cb_destroy, NULL); // clean-up
...@@ -1655,7 +1657,9 @@ ulong neb_event_callback(struct EventBlock *eblock) ...@@ -1655,7 +1657,9 @@ ulong neb_event_callback(struct EventBlock *eblock)
{ {
consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n"); consoleprintf("MySQL data volume is deactivated, shutting down MySQL Server \n");
nw_panic = TRUE; nw_panic = TRUE;
event_flag= TRUE;
kill_server(0); kill_server(0);
} }
} }
return 0; return 0;
...@@ -1729,8 +1733,8 @@ static void init_signals(void) ...@@ -1729,8 +1733,8 @@ static void init_signals(void)
for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++) for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++)
signal(signals[i], kill_server); signal(signals[i], kill_server);
mysql_cb_init(); // initialize callbacks mysql_cb_init(); // initialize callbacks
}
}
static void start_signal_handler(void) static void start_signal_handler(void)
{ {
...@@ -3065,6 +3069,7 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -3065,6 +3069,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
#endif #endif
clean_up_mutexes(); clean_up_mutexes();
my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
exit(0); exit(0);
return(0); /* purecov: deadcode */ return(0); /* purecov: deadcode */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment