Commit d98f67ce authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.1

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1

parents d8ee8008 526488f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ AC_DEFUN([MYSQL_CHECK_FEDERATED], [
  AC_ARG_WITH([federated-storage-engine],
              [
  --with-federated-storage-engine
                        Enable the MySQL Storage Engine],
                        Enable the MySQL Federated Storage Engine],
              [federateddb="$withval"],
              [federateddb=no])
  AC_MSG_CHECKING([for MySQL federated storage engine])
+48 −0
Original line number Diff line number Diff line
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
DROP TABLE IF EXISTS federated.archive_table;
CREATE TABLE federated.archive_table (
`id` int(4) NOT NULL,
`name` varchar(54) default NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`id` int(4) NOT NULL,
`name` varchar(54) default NULL,
PRIMARY KEY (`id`)
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/archive_table';
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t1 (id, name) VALUES (2, 'bar');
SELECT * FROM federated.t1;
id	name
1	foo
2	bar
DELETE FROM federated.t1 WHERE id = 1;
ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: ': 1031 : Table storage engine for 'archive_table' doesn't have t'
SELECT * FROM federated.t1;
id	name
1	foo
2	bar
UPDATE federated.t1 SET name='baz' WHERE id = 1;
ERROR HY000: There was a problem processing the query on the foreign data source. Data source error: ': 1031 : Table storage engine for 'archive_table' doesn't have t'
SELECT * FROM federated.t1;
id	name
1	foo
2	bar
DROP TABLE federated.t1;
DROP TABLE federated.archive_table;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
+5 −0
Original line number Diff line number Diff line
@@ -165,3 +165,8 @@ drop table t1;
select abs(-2) * -2;
abs(-2) * -2
-4
create table t1 (i int);
insert into t1 values (1);
select rand(i) from t1;
ERROR HY000: Incorrect arguments to RAND
drop table t1;
+21 −23
Original line number Diff line number Diff line
@@ -335,39 +335,37 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4);
set @precision=10000000000;
select rand(), 
cast(rand(10)*@precision as unsigned integer),
cast(rand(a)*@precision as unsigned integer) from t1;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(a)*@precision as unsigned integer)
-	6570515219	-
-	1282061302	-
-	6698761160	-
-	9647622201	-
cast(rand(10)*@precision as unsigned integer) from t1;
rand()	cast(rand(10)*@precision as unsigned integer)
-	6570515219
-	1282061302
-	6698761160
-	9647622201
prepare stmt from
"select rand(), 
        cast(rand(10)*@precision as unsigned integer),
        cast(rand(a)*@precision as unsigned integer),
        cast(rand(?)*@precision as unsigned integer) from t1";
set @var=1;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(a)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	-	4054035371
-	1282061302	-	8716141803
-	6698761160	-	1418603212
-	9647622201	-	944590960
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	-
-	1282061302	-
-	6698761160	-
-	9647622201	-
set @var=2;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(a)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	1559528654	6555866465
-	1282061302	6238114970	1223466192
-	6698761160	6511989195	6449731873
-	9647622201	3845601374	8578261098
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	6555866465
-	1282061302	1223466192
-	6698761160	6449731873
-	9647622201	8578261098
set @var=3;
execute stmt using @var;
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(a)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	1559528654	9057697559
-	1282061302	6238114970	3730790581
-	6698761160	6511989195	1480860534
-	9647622201	3845601374	6211931236
rand()	cast(rand(10)*@precision as unsigned integer)	cast(rand(?)*@precision as unsigned integer)
-	6570515219	9057697559
-	1282061302	3730790581
-	6698761160	1480860534
-	9647622201	6211931236
drop table t1;
deallocate prepare stmt;
create database mysqltest1;
+7 −0
Original line number Diff line number Diff line
@@ -758,3 +758,10 @@ execute stmt;
ERROR 42000: FUNCTION test.bug11834_1 does not exist
deallocate prepare stmt;
drop function bug11834_2;
DROP FUNCTION IF EXISTS bug12953|
CREATE FUNCTION bug12953() RETURNS INT
BEGIN
OPTIMIZE TABLE t1;
RETURN 1;
END|
ERROR 0A000: OPTIMIZE TABLE is not allowed in stored procedures
Loading