Commit 3f1a5f8b authored by unknown's avatar unknown

fixed up rpl000014

undid bug in ENCRYPT() - will push this now
added a test case for ENCRYPT()


mysql-test/r/rpl000014.result:
  fixed result
mysql-test/t/rpl000014.test:
  fixed timing ambiguity
sql/item_strfunc.cc:
  undid SEGV bug in ENCRYPT()
parent 33ae3217
encrypt('foo', 'ff')
ffTU0fyIP09Z.
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 73
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db
127.0.0.1 root 9306 1 4 Yes
127.0.0.1 root 9306 1 73 Yes
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db
127.0.0.1 root 9306 1 73 No
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db
......
select encrypt('foo', 'ff');
......@@ -2,9 +2,10 @@ source include/master-slave.inc;
connection master;
show master status;
connection slave;
sleep 0.2;
show slave status;
change master to master_log_pos=73;
sleep 1;
sleep 0.2;
slave stop;
change master to master_log_pos=73;
show slave status;
......@@ -19,5 +20,5 @@ create table foo (n int);
insert into foo values (1),(2),(3);
connection slave;
change master to master_log_pos=73;
sleep 0.3;
sleep 0.2;
select * from foo;
......@@ -1007,8 +1007,6 @@ String *Item_func_encrypt::val_str(String *str)
}
pthread_mutex_lock(&LOCK_crypt);
char *tmp=crypt(res->c_ptr(),salt_ptr);
tmp = 0;
*tmp = 0;
str->set(tmp,(uint) strlen(tmp));
str->copy();
pthread_mutex_unlock(&LOCK_crypt);
......
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