1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1


storage/ndb/src/cw/cpcd/Process.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp:
  Auto merged
storage/ndb/src/kernel/error/ErrorReporter.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/ndbapi/ClusterMgr.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
  Auto merged
storage/ndb/src/ndbapi/ndberror.c:
  Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
  Auto merged
storage/ndb/test/run-test/Makefile.am:
  Auto merged
storage/ndb/test/src/NDBT_ResultRow.cpp:
  Auto merged
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
This commit is contained in:
unknown
2005-05-10 20:35:14 +02:00
16 changed files with 237 additions and 34 deletions

View File

@ -0,0 +1,28 @@
use INFORMATION_SCHEMA;
show tables;
Tables_in_INFORMATION_SCHEMA
SCHEMATA
TABLES
COLUMNS
CHARACTER_SETS
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
ROUTINES
STATISTICS
VIEWS
USER_PRIVILEGES
SCHEMA_PRIVILEGES
TABLE_PRIVILEGES
COLUMN_PRIVILEGES
TABLE_CONSTRAINTS
KEY_COLUMN_USAGE
show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_INFORMATION_SCHEMA (T%)
TABLES
TABLE_PRIVILEGES
TABLE_CONSTRAINTS
create database `inf%`;
use `inf%`;
show tables;
Tables_in_inf%
drop database `inf%`;

View File

@ -158,9 +158,6 @@ a
select * from t2;
a
3
select if(compte<>3,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t2) as aggreg;
if(compte<>3,"this is broken but documented","this unexpectedly works?")
this is broken but documented
select * from mysql.proc where name="foo4" and db='mysqltest1';
db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment
mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES INVOKER begin
@ -197,9 +194,6 @@ a
select * from t1;
a
21
select if(compte<>1,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t1 where a=20) as aggreg;
if(compte<>1,"this is broken but documented","this unexpectedly works?")
this is broken but documented
select * from t2;
a
23
@ -230,6 +224,35 @@ db name type specific_name language sql_data_access is_deterministic security_ty
mysqltest1 fn1 FUNCTION fn1 SQL CONTAINS_SQL YES DEFINER int(11) begin
return unix_timestamp();
end @ # #
create trigger trg before insert on t1 for each row set new.a= 10;
ERROR 42000: Access denied; you need the SUPER privilege for this operation
flush logs;
delete from t1;
create trigger trg before insert on t1 for each row set new.a= 10;
insert into t1 values (1);
select * from t1;
a
10
select * from t1;
a
10
delete from t1;
drop trigger t1.trg;
insert into t1 values (1);
select * from t1;
a
1
show binlog events in 'master-bin.000002' from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000002 # Query 1 # use `mysqltest1`; create trigger trg before insert on t1 for each row set new.a= 10
master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000002 # Query 1 # use `mysqltest1`; drop trigger t1.trg
master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
select * from t1;
a
1
drop function fn1;
drop database mysqltest1;
drop user "zedjzlcsjhd"@127.0.0.1;

View File

@ -863,3 +863,16 @@ select 0.190287977636363637 + 0.040372670 * 0 - 0;
select -0.123 * 0;
-0.123 * 0
0.000
CREATE TABLE t1 (f1 DECIMAL (12,9), f2 DECIMAL(2,2));
INSERT INTO t1 VALUES (10.5, 0);
UPDATE t1 SET f1 = 4.5;
SELECT * FROM t1;
f1 f2
4.500000000 0.00
DROP TABLE t1;
CREATE TABLE t1 (f1 DECIMAL (64,20), f2 DECIMAL(2,2));
INSERT INTO t1 VALUES (9999999999999999999999999999999999, 0);
SELECT * FROM t1;
f1 f2
9999999999999999999999999999999999.00000000000000000000 0.00
DROP TABLE t1;

View File

@ -0,0 +1,9 @@
-- source include/testdb_only.inc
use INFORMATION_SCHEMA;
show tables;
show tables from INFORMATION_SCHEMA like 'T%';
create database `inf%`;
use `inf%`;
show tables;
drop database `inf%`;

View File

@ -437,6 +437,7 @@ explain select * from t1 where a='aaa' collate latin1_german1_ci;
drop table t1;
# Test for BUG#9348 "result for WHERE A AND (B OR C) differs from WHERE a AND (C OR B)"
--disable_warnings
CREATE TABLE t1 (
`CLIENT` char(3) character set latin1 collate latin1_bin NOT NULL default '000',
`ARG1` char(3) character set latin1 collate latin1_bin NOT NULL default '',
@ -445,6 +446,7 @@ CREATE TABLE t1 (
`FUNCTINT` int(11) NOT NULL default '0',
KEY `VERI_CLNT~2` (`ARG1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--enable_warnings
INSERT INTO t1 VALUES ('000',' 0',' 0','Text 001',0), ('000',' 0',' 1','Text 002',0),
('000',' 1',' 2','Text 003',0), ('000',' 2',' 3','Text 004',0),

View File

@ -157,7 +157,6 @@ select * from t2;
sync_slave_with_master;
select * from t1;
select * from t2;
select if(compte<>3,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t2) as aggreg;
# Test of DROP PROCEDURE
@ -194,7 +193,6 @@ select * from t1;
select * from t2;
sync_slave_with_master;
select * from t1;
select if(compte<>1,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t1 where a=20) as aggreg;
select * from t2;
connection master;
@ -225,6 +223,40 @@ select * from t1;
--replace_column 13 # 14 #
select * from mysql.proc where db='mysqltest1';
# And now triggers
connection con1;
--error 1227;
create trigger trg before insert on t1 for each row set new.a= 10;
connection master;
# fn1() above uses timestamps, so in !ps-protocol, the timezone will be
# binlogged, but in --ps-protocol it will not be (BUG#9359) so
# the binlog offsets get shifted which spoils SHOW BINLOG EVENTS.
# To be immune, we take a new binlog.
flush logs;
delete from t1;
# TODO: when triggers can contain an update, test that this update
# does not go into binlog.
# I'm not setting user vars in the trigger, because replication of user vars
# would take care of propagating the user var's value to slave, so even if
# the trigger was not executed on slave it would not be discovered.
create trigger trg before insert on t1 for each row set new.a= 10;
insert into t1 values (1);
select * from t1;
sync_slave_with_master;
select * from t1;
connection master;
delete from t1;
drop trigger t1.trg;
insert into t1 values (1);
select * from t1;
--replace_column 2 # 5 #
show binlog events in 'master-bin.000002' from 98;
sync_slave_with_master;
select * from t1;
# Clean up
connection master;

View File

@ -892,3 +892,17 @@ select 0.190287977636363637 + 0.040372670 * 0 - 0;
# Bug #9527
#
select -0.123 * 0;
#
# Bug #10232
#
CREATE TABLE t1 (f1 DECIMAL (12,9), f2 DECIMAL(2,2));
INSERT INTO t1 VALUES (10.5, 0);
UPDATE t1 SET f1 = 4.5;
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (f1 DECIMAL (64,20), f2 DECIMAL(2,2));
INSERT INTO t1 VALUES (9999999999999999999999999999999999, 0);
SELECT * FROM t1;
DROP TABLE t1;