Commit 17c2e61a authored by unknown's avatar unknown
Browse files

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1

into  mysql.com:/home/jonas/src/mysql-5.1-push


sql/ha_ndbcluster.cc:
  Auto merged
parents 16cdb388 51ddea89
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -78,6 +78,14 @@
#endif
#endif /* _WIN32... */

/* Remove some things in embedded library */
#ifdef EMBEDDED_LIBRARY
/* No partition handler in embedded library */
#ifdef HAVE_PARTITION_DB
#undef HAVE_PARTITION_DB
#endif
#endif

/* Some defines to avoid ifdefs in the code */
#ifndef NETWARE_YIELD
#define NETWARE_YIELD
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
                                         uint count, THR_LOCK_OWNER *owner);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_abort_locks(THR_LOCK *lock);
void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
void thr_print_locks(void);		/* For debugging */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data);
+0 −160
Original line number Diff line number Diff line
@@ -178,165 +178,5 @@ b int not null,
c int not null,
primary key(a,b))
partition by list (a)
subpartition by hash (a+b)
subpartitions 3
( partition x1 values in (1,2,4)
( subpartition x11 nodegroup 0,
subpartition x12 nodegroup 1),
partition x2 values in (3,5,6)
( subpartition x21 nodegroup 0,
subpartition x22 nodegroup 1)
);
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '),
partition x2 values in (3,5,6)
( subpartition x21 nodegroup 0,
subpartition x' at line 11
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key (a,b))
partition by list (a)
subpartition by hash (a+b)
( partition x1 values in (1)
( subpartition x11 nodegroup 0,
subpartition xextra,
subpartition x12 nodegroup 1),
partition x2 values in (2)
( subpartition x21 nodegroup 0,
subpartition x22 nodegroup 1)
);
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')
)' at line 14
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key (a,b))
partition by key (a) 
subpartition by list (a+b)
( partition x1
( subpartition x11 engine myisam,
subpartition x12 engine myisam),
partition x2 
( subpartition x21 engine myisam,
subpartition x22 engine myisam)
);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'list (a+b)
( partition x1
( subpartition x11 engine myisam,
subpartition x12 eng' at line 7
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key (a,b))
partition by key (a)
subpartition by list (a+b)
( partition x1
( subpartition x11 engine myisam values in (0),
subpartition x12 engine myisam values in (1)),
partition x2
( subpartition x21 engine myisam values in (0),
subpartition x22 engine myisam values in (1))
);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'list (a+b)
( partition x1
( subpartition x11 engine myisam values in (0),
subpar' at line 7
CREATE TABLE t1 ( 
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
(partition x1 values in (1,2,9,4) tablespace ts1);
drop table t1;
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a);
ERROR HY000: For LIST partitions each partition must be defined
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (3+4)
partitions 2 
(partition x1 values in (4) tablespace ts1,
partition x2 values in (8) tablespace ts2);
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a+d)
partitions 2
(partition x1 values in (4) tablespace ts1,
partition x2 values in (8) tablespace ts2);
ERROR 42S22: Unknown column 'd' in 'partition function'
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in (4),
partition x2);
ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in (4),
partition x2 values less than (5));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in (4,6),
partition x2);
ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in (4, 12+9),
partition x2 values in (3, 21));
ERROR HY000: Multiple definition of same constant in list partitioning
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in (4.0, 12+8),
partition x2 values in (3, 21));
ERROR HY000: VALUES IN value must be of same type as partition function
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b))
partition by list (a)
partitions 2
(partition x1 values in 4,
partition x2 values in (5));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4,
partition x2 values in (5))' at line 8
+5 −2
Original line number Diff line number Diff line
@@ -1048,9 +1048,10 @@ void thr_abort_locks(THR_LOCK *lock)
  This is used to abort all locks for a specific thread
*/

void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
{
  THR_LOCK_DATA *data;
  bool found= FALSE;
  DBUG_ENTER("thr_abort_locks_for_thread");

  pthread_mutex_lock(&lock->mutex);
@@ -1061,6 +1062,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
      DBUG_PRINT("info",("Aborting read-wait lock"));
      data->type= TL_UNLOCK;			/* Mark killed */
      /* It's safe to signal the cond first: we're still holding the mutex. */
      found= TRUE;
      pthread_cond_signal(data->cond);
      data->cond= 0;				/* Removed from list */

@@ -1076,6 +1078,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
    {
      DBUG_PRINT("info",("Aborting write-wait lock"));
      data->type= TL_UNLOCK;
      found= TRUE;
      pthread_cond_signal(data->cond);
      data->cond= 0;

@@ -1086,7 +1089,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread)
    }
  }
  pthread_mutex_unlock(&lock->mutex);
  DBUG_VOID_RETURN;
  DBUG_RETURN(found);
}


+13 −10
Original line number Diff line number Diff line
@@ -140,16 +140,19 @@ static handlerton archive_hton = {
  "archive",
  0,       /* slot */
  0,       /* savepoint size. */
  0,       /* close_connection */
  0,       /* savepoint */
  0,       /* rollback to savepoint */
  0,       /* releas savepoint */
  0,       /* commit */
  0,       /* rollback */
  0,       /* prepare */
  0,       /* recover */
  0,       /* commit_by_xid */
  0,       /* rollback_by_xid */
  NULL,    /* close_connection */
  NULL,    /* savepoint */
  NULL,    /* rollback to savepoint */
  NULL,    /* releas savepoint */
  NULL,    /* commit */
  NULL,    /* rollback */
  NULL,    /* prepare */
  NULL,    /* recover */
  NULL,    /* commit_by_xid */
  NULL,    /* rollback_by_xid */
  NULL,    /* create_cursor_read_view */
  NULL,    /* set_cursor_read_view */
  NULL,    /* close_cursor_read_view */
  HTON_NO_FLAGS
};

Loading