1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

merged mysql-5.5->mysql-5.5-security

This commit is contained in:
Georgi Kodinov
2012-02-17 11:55:36 +02:00
132 changed files with 361 additions and 160 deletions

View File

@@ -106,3 +106,4 @@ let $wait_condition=
select count(*) = 0 from information_schema.processlist
where db='events_test' and command = 'Connect' and user=current_user();
--source include/wait_condition.inc

View File

@@ -6,6 +6,8 @@
source include/not_embedded.inc;
source include/have_log_bin.inc;
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
--disable_warnings
drop table if exists t1,t2,t3;
drop database if exists mysqltest;
@@ -138,6 +140,7 @@ INSERT INTO t2(ParId) VALUES(1), (2), (3);
select * from t2;
--disable_warnings ONCE
UPDATE t2, t1 SET t2.tst = t1.tst, t2.tst1 = t1.tst1 WHERE t2.ParId = t1.Id;
select * from t2;
@@ -295,6 +298,7 @@ drop table t1,t2;
create table t1 (a int not null auto_increment primary key, b int not null);
insert into t1 (b) values (1),(2),(3),(4);
--disable_warnings ONCE
update t1, t1 as t2 set t1.b=t2.b+1 where t1.a=t2.a;
select * from t1;
drop table t1;
@@ -352,6 +356,7 @@ create table `t2` (`c2_id` int(10) unsigned NULL auto_increment, `c2_p_id` int(1
insert into t1 values (0,'A01-Comp',1);
insert into t1 values (0,'B01-Comp',1);
insert into t2 values (0,1,'A Note',1);
--disable_warnings ONCE
update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2;
select * from t1;
select * from t2;

View File

@@ -1,5 +1,6 @@
-- source include/not_embedded.inc
-- source include/have_log_bin.inc
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
#
# SQL Syntax for Prepared Statements test
#
@@ -238,8 +239,10 @@ prepare stmt1 from "select 1 into @var";
execute stmt1;
execute stmt1;
prepare stmt1 from "create table t1 select 1 as i";
--disable_warnings ONCE
execute stmt1;
drop table t1;
--disable_warnings ONCE
execute stmt1;
prepare stmt1 from "insert into t1 select i from t1";
execute stmt1;
@@ -432,6 +435,7 @@ deallocate prepare stmt;
create table t1 (a int);
insert into t1 values (1),(2),(3);
create table t2 select * from t1;
--disable_warnings
prepare stmt FROM 'create table t2 select * from t1';
drop table t2;
execute stmt;
@@ -441,6 +445,7 @@ execute stmt;
execute stmt;
drop table t2;
execute stmt;
--enable_warnings
drop table t1,t2;
deallocate prepare stmt;
@@ -1176,6 +1181,7 @@ create database mysqltest character set utf8;
prepare stmt1 from "create table mysqltest.t1 (c char(10))";
prepare stmt2 from "create table mysqltest.t2 select 'test'";
execute stmt1;
--disable_warnings ONCE
execute stmt2;
show create table mysqltest.t1;
show create table mysqltest.t2;
@@ -1183,6 +1189,7 @@ drop table mysqltest.t1;
drop table mysqltest.t2;
alter database mysqltest character set latin1;
execute stmt1;
--disable_warnings ONCE
execute stmt2;
show create table mysqltest.t1;
show create table mysqltest.t2;