Commit ab1fdbde authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

Merge work:/home/bk/mysql-4.0

into mysql.sashanet.com:/reiser-data/mysql-4.0
parents 6e4b2136 f28f8d08
Loading
Loading
Loading
Loading
+22 −6
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@
 *	all copies and derivative works.  Thank you.			      *
 *									      *
 *	The author makes no warranty of any kind  with	respect  to  this     *
 *	product  and  explicitly disclaims any implied warranties of mer-     *
 *	product  and  explicitly disclaims any implied warranties of mer-     *ct_lex.table_list.first=0;
  thd->lex.selec
 *	chantability or fitness for any particular purpose.		      *
 *									      *
 ******************************************************************************
@@ -58,7 +59,7 @@
 *	seismo!bpa!sjuvax!bbanerje
 *
 *	Michael Widenius:
 *	DBUG_DUMP	- To dump a pice of memory.
 *	DBUG_DUMP	- To dump a block of memory.
 *	PUSH_FLAG "O"	- To be used insted of "o" if we don't
 *			  want flushing (for slow systems)
 *	PUSH_FLAG "A"	- as 'O', but we will append to the out file instead
@@ -707,7 +708,13 @@ char ***_sframep_ __attribute__((unused)))
    int save_errno=errno;
    if (!init_done)
      _db_push_ (_DBUG_START_CONDITION_);
    state=code_state();
    /* Sasha: the test below is so we could call functions with DBUG_ENTER
       before my_thread_init(). I needed this because I suspected corruption
       of a block allocated by my_thread_init() itself, so I wanted to use
       my_malloc()/my_free() in my_thread_init()/my_thread_end()
    */
    if (!(state=code_state()))
      return;

    *_sfunc_ = state->func;
    *_sfile_ = state->file;
@@ -855,6 +862,9 @@ uint _line_,
const char *keyword)
{
  CODE_STATE *state=code_state();
  /* Sasha: pre-my_thread_init() safety */
  if (!state)
    return;
  state->u_line = _line_;
  state->u_keyword = (char*) keyword;
}
@@ -890,7 +900,9 @@ void _db_doprnt_ (const char *format,...)
{
  va_list args;
  CODE_STATE *state;
  state=code_state();
  /* Sasha: pre-my_thread_init() safety */
  if (!(state=code_state()))
    return;

  va_start(args,format);

@@ -942,7 +954,9 @@ uint length)
  int pos;
  char dbuff[90];
  CODE_STATE *state;
  state=code_state();
  /* Sasha: pre-my_thread_init() safety */
  if (!(state=code_state()))
    return;

  if (_db_keyword_ ((char*) keyword))
  {
@@ -1224,7 +1238,9 @@ const char *keyword)

  if (!init_done)
    _db_push_ ("");
  state=code_state();
  /* Sasha: pre-my_thread_init() safety */
  if (!(state=code_state()))
    return FALSE;
  result = FALSE;
  if (DEBUGGING &&
      state->level <= stack -> maxdepth &&
+4 −0
Original line number Diff line number Diff line
@@ -137,6 +137,10 @@ extern int NEAR my_errno; /* Last error in mysys */
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
extern ulonglong safemalloc_mem_limit;
/* keep track of shutdown,signal, and main threads so that my_end() will not
   report errors with them
*/
extern pthread_t shutdown_th, main_th,signal_th;
#define CALLER_INFO_PROTO   , const char *sFile, uint uLine
#define CALLER_INFO         , __FILE__, __LINE__
#define ORIG_CALLER_INFO    , sFile, uLine
+27 −0
Original line number Diff line number Diff line
@@ -2,7 +2,34 @@ drop table if exists t1,t2,t3;
create table t1(id1 int not null auto_increment primary key, t char(12));
create table t2(id2 int not null, t char(12));
create table t3(id3 int not null, t char(12), index(id3));
select count(*) from t1 where id1 > 95;
count(*)
5
select count(*) from t2 where id2 > 95;
count(*)
25
select count(*) from t3 where id3 > 95;
count(*)
250
update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where  t1.id1 = t2.id2 and t2.id2 = t3.id3  and t1.id1 > 90;
select count(*) from t1 where t = "aaa";
count(*)
10
select count(*) from t1 where id1 > 90;
count(*)
10
select count(*) from t2 where t = "bbb";
count(*)
10
select count(*) from t2 where id2 > 90;
count(*)
50
select count(*) from t3 where t = "cc";
count(*)
500
select count(*) from t3 where id3 > 90;
count(*)
500
delete t1.*, t2.*, t3.*  from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3  and t1.id1 > 95;
check table t1, t2, t3;
Table	Op	Msg_type	Msg_text
+3 −3
Original line number Diff line number Diff line
@@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo
change master to master_host='127.0.0.1';
show slave status;
Master_Host	Master_User	Master_Port	Connect_retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Exec_master_log_pos
127.0.0.1	test	MASTER_PORT	60		4	slave-relay-bin.001	4		No	No			0		0	0
127.0.0.1	test	MASTER_PORT	7		4	slave-relay-bin.001	4		No	No			0		0	0
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
show slave status;
Master_Host	Master_User	Master_Port	Connect_retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Exec_master_log_pos
127.0.0.1	root	MASTER_PORT	60		4	slave-relay-bin.001	4		No	No			0		0	0
127.0.0.1	root	MASTER_PORT	7		4	slave-relay-bin.001	4		No	No			0		0	0
slave start;
show slave status;
Master_Host	Master_User	Master_Port	Connect_retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Exec_master_log_pos
127.0.0.1	root	MASTER_PORT	60	master-bin.001	79	slave-relay-bin.001	120	master-bin.001	Yes	Yes			0		0	79
127.0.0.1	root	MASTER_PORT	7	master-bin.001	79	slave-relay-bin.001	120	master-bin.001	Yes	Yes			0		0	79
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
+11 −0
Original line number Diff line number Diff line
@@ -29,7 +29,18 @@ while ($1)
  dec $1;
 }
enable_query_log;

select count(*) from t1 where id1 > 95;
select count(*) from t2 where id2 > 95;
select count(*) from t3 where id3 > 95;

update t1,t2,t3 set t1.t="aaa", t2.t="bbb", t3.t="cc" where  t1.id1 = t2.id2 and t2.id2 = t3.id3  and t1.id1 > 90;
select count(*) from t1 where t = "aaa";
select count(*) from t1 where id1 > 90;
select count(*) from t2 where t = "bbb";
select count(*) from t2 where id2 > 90;
select count(*) from t3 where t = "cc";
select count(*) from t3 where id3 > 90;
delete t1.*, t2.*, t3.*  from t1,t2,t3 where t1.id1 = t2.id2 and t2.id2 = t3.id3  and t1.id1 > 95;

check table t1, t2, t3;
Loading