mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
merge from 5.5 main
This commit is contained in:
2
mysql-test/t/auth_rpl-master.opt
Normal file
2
mysql-test/t/auth_rpl-master.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
$PLUGIN_AUTH_OPT
|
||||
$PLUGIN_AUTH_LOAD
|
4
mysql-test/t/auth_rpl-slave.opt
Normal file
4
mysql-test/t/auth_rpl-slave.opt
Normal file
@@ -0,0 +1,4 @@
|
||||
--master-retry-count=1
|
||||
$PLUGIN_AUTH_OPT
|
||||
$PLUGIN_AUTH_LOAD
|
||||
|
66
mysql-test/t/auth_rpl.test
Normal file
66
mysql-test/t/auth_rpl.test
Normal file
@@ -0,0 +1,66 @@
|
||||
--source include/have_plugin_auth.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
#
|
||||
# Check that replication slave can connect to master using an account
|
||||
# which authenticates with an external authentication plugin (bug#12897501).
|
||||
|
||||
#
|
||||
# First stop the slave to guarantee that nothing is replicated.
|
||||
#
|
||||
--connection slave
|
||||
--echo [connection slave]
|
||||
--source include/stop_slave.inc
|
||||
#
|
||||
# Create an replication account on the master.
|
||||
#
|
||||
--connection master
|
||||
--echo [connection master]
|
||||
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
||||
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
#
|
||||
# Now go to slave and change the replication user.
|
||||
#
|
||||
--connection slave
|
||||
--echo [connection slave]
|
||||
--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
|
||||
CHANGE MASTER TO
|
||||
MASTER_USER= 'plug_user',
|
||||
MASTER_PASSWORD= 'plug_user';
|
||||
|
||||
#
|
||||
# Start slave with new replication account - this should trigger connection
|
||||
# to the master server.
|
||||
#
|
||||
--source include/start_slave.inc
|
||||
|
||||
# Replicate all statements executed on master, in this case,
|
||||
# (creation of the plug_user account).
|
||||
#
|
||||
--connection master
|
||||
--sync_slave_with_master
|
||||
--echo # Slave in-sync with master now.
|
||||
|
||||
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
||||
|
||||
#
|
||||
# Now we can stop the slave and clean up.
|
||||
#
|
||||
# Note: it is important that slave is stopped at this
|
||||
# moment - otherwise master's cleanup statements
|
||||
# would be replicated on slave!
|
||||
#
|
||||
--echo # Cleanup (on slave).
|
||||
--source include/stop_slave.inc
|
||||
eval CHANGE MASTER TO MASTER_USER='$master_user';
|
||||
DROP USER 'plug_user';
|
||||
|
||||
--echo # Cleanup (on master).
|
||||
--connection master
|
||||
DROP USER 'plug_user';
|
||||
|
||||
--let $rpl_only_running_threads= 1
|
||||
--source include/rpl_end.inc
|
@@ -1436,6 +1436,25 @@ SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
|
||||
--echo #
|
||||
|
||||
SELECT (rpad(1.0,2048,1)) IS NOT FALSE;
|
||||
SELECT ((+0) IN
|
||||
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
|
||||
(32767.1)));
|
||||
SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
|
||||
|
||||
--error 1690
|
||||
SELECT
|
||||
pow((rpad(1.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
|
||||
SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
|
||||
SELECT stddev_samp(rpad(1.0,2048,1));
|
||||
SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));
|
||||
SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
@@ -221,3 +221,47 @@ DROP TABLE t1,t2,t3;
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
|
||||
--echo #
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
|
||||
FLUSH TABLE t1;
|
||||
--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1
|
||||
--exec $MYISAMCHK -srq $MYSQLD_DATADIR/test/t1
|
||||
CHECK TABLE t1;
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Test table with key_reflength > rec_reflength
|
||||
CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
|
||||
--disable_query_log
|
||||
--echo # Populating a table, so it's index file exceeds 65K
|
||||
let $1=1700;
|
||||
while ($1)
|
||||
{
|
||||
eval INSERT INTO t1 VALUES('$1aaaaaaaaaaaaaaaaaaaaaaaaaa');
|
||||
dec $1;
|
||||
}
|
||||
|
||||
--echo # Populating a table, so index file has second level fulltext tree
|
||||
let $1=60;
|
||||
while ($1)
|
||||
{
|
||||
eval INSERT INTO t1 VALUES('aaaa'),('aaaa'),('aaaa'),('aaaa'),('aaaa');
|
||||
dec $1;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
FLUSH TABLE t1;
|
||||
--echo # Compressing table
|
||||
--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1
|
||||
--echo # Fixing index (repair by sort)
|
||||
--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1
|
||||
CHECK TABLE t1;
|
||||
FLUSH TABLE t1;
|
||||
--echo # Fixing index (repair with keycache)
|
||||
--exec $MYISAMCHK -soq $MYSQLD_DATADIR/test/t1
|
||||
CHECK TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user