Commit b98807ec authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/jonas/src/mysql-4.1

into mysql.com:/home/jonas/src/mysql-4.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
parents e0274db3 ab5c7a9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@ SHARED_LIB_VERSION=14:0:0
# ndb version
NDB_VERSION_MAJOR=3
NDB_VERSION_MINOR=5
NDB_VERSION_BUILD=1
NDB_VERSION_STATUS=beta
NDB_VERSION_BUILD=2
NDB_VERSION_STATUS=""

# Set all version vars based on $VERSION. How do we do this more elegant ?
# Remember that regexps needs to quote [ and ] since this is run through m4
+0 −1
Original line number Diff line number Diff line
@@ -234,7 +234,6 @@ extern int my_sigwait(const sigset_t *set,int *sig);
#include <signal.h>
#undef sigwait
#endif
#undef _REENTRANT			/* Fix if _REENTRANT is in pthread.h */
#include <pthread.h>
#ifndef _REENTRANT
#define _REENTRANT
+9 −0
Original line number Diff line number Diff line
@@ -365,6 +365,15 @@ lock_deadlock_recursive(
	ulint*	cost);		/* in/out: number of calculation steps thus
				far: if this exceeds LOCK_MAX_N_STEPS_...
				we return TRUE */
/*************************************************************************
Gets the nth bit of a record lock. */
UNIV_INLINE
ibool
lock_rec_get_nth_bit(
/*=================*/
			/* out: TRUE if bit set */
	lock_t*	lock,	/* in: record lock */
	ulint	i);	/* in: index of the bit */

#define lock_mutex_enter_kernel()	mutex_enter(&kernel_mutex)
#define lock_mutex_exit_kernel()	mutex_exit(&kernel_mutex)
+17 −2
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ create table t1 (a timestamp null, b timestamp null);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `a` timestamp NULL default NULL,
  `b` timestamp NULL default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL, NULL);
@@ -378,7 +378,22 @@ insert into t1 values ();
select * from t1;
a	b
NULL	NULL
2001-09-09 04:46:57	NULL
NULL	NULL
drop table t1;
create table t1 (a timestamp null default current_timestamp on update current_timestamp, b timestamp null);
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `b` timestamp NULL default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL, NULL);
SET TIMESTAMP=1000000018;
insert into t1 values ();
select * from t1;
a	b
NULL	NULL
2001-09-09 04:46:58	NULL
drop table t1;
create table t1 (a timestamp null default null, b timestamp null default '2003-01-01 00:00:00');
show create table t1;
+13 −2
Original line number Diff line number Diff line
@@ -236,9 +236,10 @@ drop table t1;

#
# Test for TIMESTAMP columns which are able to store NULLs
# (Auto-set property should work for them and NULL values
#  should be OK as default values)
#

# Unlike for default TIMESTAMP fields we don't interpret first field
# in this table as TIMESTAMP with DEFAULT NOW() ON UPDATE NOW() properties.
create table t1 (a timestamp null, b timestamp null);
show create table t1;
insert into t1 values (NULL, NULL);
@@ -247,6 +248,16 @@ insert into t1 values ();
select * from t1;
drop table t1;

# But explicit auto-set properties still should be OK.
create table t1 (a timestamp null default current_timestamp on update current_timestamp, b timestamp null);
show create table t1;
insert into t1 values (NULL, NULL);
SET TIMESTAMP=1000000018;
insert into t1 values ();
select * from t1;
drop table t1;

# It is also OK to specify NULL as default explicitly for such fields.
create table t1 (a timestamp null default null, b timestamp null default '2003-01-01 00:00:00');
show create table t1;
insert into t1 values (NULL, NULL);
Loading