⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpl_row_sp012.test

📁 开启mysql的远程连接的方法 mysql-noinstall-5.1.6-alpha-win32.zip
💻 TEST
字号:
############################################################################## Original Author: JBM                                                      ## Original Date: Aug/22/2005                                                ## Update: 08/29/2005  Added save pos and sync                               ###############################################################################TEST: SP to test security and current_user and user                        ############################################################################### Includes-- source include/have_binlog_format_row.inc-- source include/not_embedded.inc-- source include/master-slave.inc# Begin clean up test sectionconnection master;--disable_warningsDROP PROCEDURE IF EXISTS test.p1;DROP PROCEDURE IF EXISTS test.p2;DROP PROCEDURE IF EXISTS test.p3;# Begin test section 1 # Create user user1 with no particular access rightsgrant usage on *.* to user1@localhost;flush privileges;SELECT CURRENT_USER();SELECT USER();CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER();CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1();CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1();GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost;GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost;GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost;# Need to wait for the rights to be applied at the slavesync_slave_with_master;let $message=<********  Master user1 p3 & p2 calls *******>;--source include/show_msg.incconnect (muser1,localhost,user1,,);connection muser1;SELECT CURRENT_USER();SELECT USER();CALL test.p3();CALL test.p2();let $message=<********  Slave user1 p3 & p2 calls *******>;--source include/show_msg.incconnect (suser1,127.0.0.1,user1,,test,$SLAVE_MYPORT,);connection master;save_master_pos;connection suser1;sync_with_master;SELECT CURRENT_USER();SELECT USER();CALL test.p3();CALL test.p2();connection master;# lets cleanupDROP PROCEDURE IF EXISTS test.p1;DROP PROCEDURE IF EXISTS test.p3;DROP PROCEDURE IF EXISTS test.p2;DROP TABLE IF EXISTS test.t1;DROP TABLE IF EXISTS test.t2;# End of 5.0 test case

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -