mirror of
https://github.com/MariaDB/server.git
synced 2025-10-19 21:09:40 +03:00
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/51 configure.in: Auto merged BitKeeper/deleted/.del-ctype_cp932_notembedded.test~3047e508460cef42: Auto merged mysql-test/extra/binlog_tests/binlog.test: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Auto merged mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Auto merged mysql-test/extra/binlog_tests/drop_temp_table.test: Auto merged mysql-test/extra/binlog_tests/insert_select-binlog.test: Auto merged mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Auto merged mysql-test/include/mix1.inc: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/binlog_stm_binlog.result: Auto merged mysql-test/r/binlog_stm_mix_innodb_myisam.result: Auto merged mysql-test/r/have_log_bin.require: Auto merged mysql-test/t/flush_block_commit_notembedded.test: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/mysqlbinlog-cp932.test: Auto merged mysql-test/t/mysqlbinlog2.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/sp_trans.test: Auto merged sql/handler.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/date_formats.result: Use local mysql-test/r/partition.result: SCCS merged mysql-test/t/date_formats.test: Use local mysql-test/t/ndb_basic.test: manual merge mysql-test/t/partition.test: manual merge mysql-test/t/user_var-binlog.test: use local
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# This test is to verify replication with PS
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_binlog_format_mixed_or_statement.inc
|
||||
|
||||
-- disable_query_log
|
||||
|
@@ -43,7 +43,6 @@ rpl_ndb_ddl : BUG#28798 2007-05-31 lars Valgrind failure in NDB
|
||||
|
||||
#rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
|
||||
|
||||
rpl_ndb_stm_innodb : Bug#26783
|
||||
ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms
|
||||
|
||||
im_options_set : Bug#20294: Instance manager tests fail randomly
|
||||
|
1
mysql-test/t/error_simulation-master.opt
Normal file
1
mysql-test/t/error_simulation-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--loose-debug=d,raise_error
|
30
mysql-test/t/error_simulation.test
Normal file
30
mysql-test/t/error_simulation.test
Normal file
@@ -0,0 +1,30 @@
|
||||
-- source include/have_debug.inc
|
||||
|
||||
#
|
||||
# Bug #28499: crash for grouping query when tmp_table_size is too small
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
|
||||
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
|
||||
ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
('AAAAAAAAAA','AAAAAAAAAA'), ('AAAAAAAAAB','AAAAAAAAAB '),
|
||||
('AAAAAAAAAB','AAAAAAAAAB'), ('AAAAAAAAAC','AAAAAAAAAC'),
|
||||
('AAAAAAAAAD','AAAAAAAAAD'), ('AAAAAAAAAE','AAAAAAAAAE'),
|
||||
('AAAAAAAAAF','AAAAAAAAAF'), ('AAAAAAAAAG','AAAAAAAAAG'),
|
||||
('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'),
|
||||
('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK');
|
||||
|
||||
set tmp_table_size=1024;
|
||||
|
||||
--replace_regex /in table '[^']+'/in table 'tmp_table'/
|
||||
--error ER_DUP_KEY
|
||||
SELECT MAX(a) FROM t1 GROUP BY a,b;
|
||||
|
||||
set tmp_table_size=default;
|
||||
|
||||
DROP TABLE t1;
|
@@ -3,6 +3,8 @@
|
||||
# We verify that we did not introduce a deadlock.
|
||||
# This is intended to mimick how mysqldump and innobackup work.
|
||||
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
# And it requires InnoDB
|
||||
-- source include/have_log_bin.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
@@ -558,6 +558,19 @@ SELECT Overlaps(@horiz1, @point2) FROM DUAL;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#28763: Selecting geometry fields in UNION caused server crash.
|
||||
#
|
||||
create table t1(f1 geometry, f2 point, f3 linestring);
|
||||
select f1 from t1 union select f1 from t1;
|
||||
insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'),
|
||||
GeomFromText('LINESTRING(0 0,1 1,2 2)'));
|
||||
select AsText(f2),AsText(f3) from t1;
|
||||
select AsText(a) from (select f2 as a from t1 union select f3 from t1) t;
|
||||
create table t2 as select f2 as a from t1 union select f3 from t1;
|
||||
desc t2;
|
||||
select AsText(a) from t2;
|
||||
drop table t1, t2;
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
|
@@ -555,5 +555,35 @@ drop database mysqltest_1;
|
||||
drop database mysqltest_2;
|
||||
drop user mysqltest_u1@localhost;
|
||||
|
||||
#
|
||||
# Bug#18660 Can't grant any privileges on single table in database
|
||||
# with underscore char
|
||||
#
|
||||
grant all on `mysqltest\_%`.* to mysqltest_1@localhost with grant option;
|
||||
grant usage on *.* to mysqltest_2@localhost;
|
||||
connect (con18600_1,localhost,mysqltest_1,,);
|
||||
|
||||
create database mysqltest_1;
|
||||
use mysqltest_1;
|
||||
create table t1 (f1 int);
|
||||
|
||||
grant create on `mysqltest\_1`.* to mysqltest_2@localhost;
|
||||
grant select on mysqltest_1.t1 to mysqltest_2@localhost;
|
||||
connect (con3,localhost,mysqltest_2,,);
|
||||
connection con3;
|
||||
--error 1044
|
||||
create database mysqltest_3;
|
||||
use mysqltest_1;
|
||||
create table t2(f1 int);
|
||||
select * from t1;
|
||||
connection default;
|
||||
drop database mysqltest_1;
|
||||
|
||||
revoke all privileges, grant option from mysqltest_1@localhost;
|
||||
revoke all privileges, grant option from mysqltest_2@localhost;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop user mysqltest_2@localhost;
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
@@ -780,7 +780,7 @@ INSERT INTO t1 SELECT a + 8,b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 16,b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 32,b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 64,b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 128,b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 128,b FROM t1 limit 16;
|
||||
ANALYZE TABLE t1;
|
||||
EXPLAIN SELECT a FROM t1 WHERE a < 2;
|
||||
EXPLAIN SELECT a FROM t1 WHERE a < 2 ORDER BY a;
|
||||
|
@@ -1024,6 +1024,21 @@ where t.table_schema = 'information_schema' and
|
||||
group by c2.column_type order by num limit 1)
|
||||
group by t.table_name order by num1, t.table_name;
|
||||
|
||||
#
|
||||
# Bug#28266 IS_UPDATABLE field on VIEWS table in I_S database is wrong
|
||||
#
|
||||
create table t1(f1 int);
|
||||
create view v1 as select f1+1 as a from t1;
|
||||
create table t2 (f1 int, f2 int);
|
||||
create view v2 as select f1+1 as a, f2 as b from t2;
|
||||
select table_name, is_updatable from information_schema.views;
|
||||
#
|
||||
# Note: we can perform 'delete' for non updatable view.
|
||||
#
|
||||
delete from v1;
|
||||
drop view v1,v2;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
#
|
||||
# Show engines
|
||||
|
@@ -290,3 +290,19 @@ INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#28904: INSERT .. ON DUPLICATE was silently updating rows when it
|
||||
# shouldn't.
|
||||
#
|
||||
create table t1(f1 int primary key,
|
||||
f2 timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP);
|
||||
insert into t1(f1) values(1);
|
||||
--replace_column 1 #
|
||||
select @stamp1:=f2 from t1;
|
||||
--sleep 2
|
||||
insert into t1(f1) values(1) on duplicate key update f1=1;
|
||||
--replace_column 1 #
|
||||
select @stamp2:=f2 from t1;
|
||||
select if( @stamp1 = @stamp2, "correct", "wrong");
|
||||
drop table t1;
|
||||
|
@@ -2,6 +2,9 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
# Binlog is required
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
|
||||
drop database if exists mysqldump_test_db;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
# This test should work in embedded server after mysqltest is fixed
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
|
@@ -752,46 +752,6 @@ INSERT INTO t1 VALUES
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 5.0 tests
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
#
|
||||
# Bug #18483 Cannot create table with FK constraint
|
||||
# ndb does not support foreign key constraint, it is silently ignored
|
||||
# in line with other storage engines
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
|
||||
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
|
||||
CREATE TABLE t2(a VARCHAR(255) NOT NULL,
|
||||
b VARCHAR(255) NOT NULL,
|
||||
c VARCHAR(255) NOT NULL,
|
||||
CONSTRAINT pk_b_c_id PRIMARY KEY (b,c),
|
||||
CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb;
|
||||
drop table t1, t2;
|
||||
|
||||
# bug#24301
|
||||
create table t1 (a int not null primary key, b int) engine=ndb;
|
||||
insert into t1 values(1,1),(2,2),(3,3);
|
||||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
select * from t1 order by a;
|
||||
select * from t2 order by a;
|
||||
drop table t1, t2;
|
||||
|
||||
# create table if not exists
|
||||
--disable_warnings
|
||||
create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
|
||||
create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
|
||||
--enable_warnings
|
||||
|
||||
# create like
|
||||
create table t2 like t1;
|
||||
|
||||
# multi rename
|
||||
rename table t1 to t10, t2 to t20;
|
||||
drop table t10,t20;
|
||||
|
||||
# delete
|
||||
create table t1 (a int not null primary key, b int not null) engine=ndb;
|
||||
create table t2 (a int not null primary key, b int not null) engine=ndb;
|
||||
@@ -832,4 +792,44 @@ update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3;
|
||||
select * from t1 order by a;
|
||||
drop table t1,t2;
|
||||
|
||||
# End of 5.0 tests
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
#
|
||||
# Bug #18483 Cannot create table with FK constraint
|
||||
# ndb does not support foreign key constraint, it is silently ignored
|
||||
# in line with other storage engines
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255) NOT NULL,
|
||||
CONSTRAINT pk_a PRIMARY KEY (a))engine=ndb;
|
||||
CREATE TABLE t2(a VARCHAR(255) NOT NULL,
|
||||
b VARCHAR(255) NOT NULL,
|
||||
c VARCHAR(255) NOT NULL,
|
||||
CONSTRAINT pk_b_c_id PRIMARY KEY (b,c),
|
||||
CONSTRAINT fk_a FOREIGN KEY(a) REFERENCES t1(a))engine=ndb;
|
||||
drop table t1, t2;
|
||||
|
||||
# bug#24301
|
||||
create table t1 (a int not null primary key, b int) engine=ndb;
|
||||
insert into t1 values(1,1),(2,2),(3,3);
|
||||
create table t2 like t1;
|
||||
insert into t2 select * from t1;
|
||||
select * from t1 order by a;
|
||||
select * from t2 order by a;
|
||||
drop table t1, t2;
|
||||
|
||||
# create table if not exists
|
||||
--disable_warnings
|
||||
create table t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
|
||||
create table if not exists t1 (a int not null primary key, b int not null default 0, c varchar(254)) engine=ndb;
|
||||
--enable_warnings
|
||||
|
||||
# create like
|
||||
create table t2 like t1;
|
||||
|
||||
# multi rename
|
||||
rename table t1 to t10, t2 to t20;
|
||||
drop table t10,t20;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -1464,5 +1464,34 @@ insert into t1 values (null), (null), (null);
|
||||
--replace_column 9 0 12 NULL 13 NULL 14 NULL
|
||||
show table status;
|
||||
drop table t1;
|
||||
# Bug #28488: Incorrect information in file: './test/t1_test#.frm'
|
||||
#
|
||||
|
||||
CREATE TABLE t1(a INT NOT NULL, b TINYBLOB, KEY(a))
|
||||
PARTITION BY RANGE(a) ( PARTITION p0 VALUES LESS THAN (32));
|
||||
INSERT INTO t1 VALUES (1, REPEAT('a', 10));
|
||||
INSERT INTO t1 SELECT a + 1, b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 2, b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 4, b FROM t1;
|
||||
INSERT INTO t1 SELECT a + 8, b FROM t1;
|
||||
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION p1 VALUES LESS THAN (64));
|
||||
ALTER TABLE t1 DROP PARTITION p1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #27816: Log tables ran with partitions crashes the server when logging
|
||||
# is enabled.
|
||||
#
|
||||
|
||||
USE mysql;
|
||||
SET GLOBAL general_log = 0;
|
||||
ALTER TABLE general_log ENGINE = MyISAM;
|
||||
--error ER_WRONG_USAGE
|
||||
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
|
||||
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
|
||||
ALTER TABLE general_log ENGINE = CSV;
|
||||
SET GLOBAL general_log = default;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# tests that require InnoDB...
|
||||
#
|
||||
|
||||
-- source include/have_log_bin.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
|
@@ -1821,13 +1821,6 @@ SELECT * FROM t1
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
#
|
||||
# BUG #10308: purge log with subselect
|
||||
#
|
||||
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
|
||||
|
||||
#
|
||||
# Bug#18503: Queries with a quantified subquery returning empty set may
|
||||
# return a wrong result.
|
||||
@@ -2920,6 +2913,38 @@ SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #28811: crash for query containing subquery with ORDER BY and LIMIT 1
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a varchar(255) default NULL,
|
||||
b timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
INDEX idx(a,b)
|
||||
);
|
||||
CREATE TABLE t2 (
|
||||
a varchar(255) default NULL
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES ('abcdefghijk','2007-05-07 06:00:24');
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO `t1` VALUES ('asdf','2007-02-08 01:11:26');
|
||||
INSERT INTO `t2` VALUES ('abcdefghijk');
|
||||
INSERT INTO `t2` VALUES ('asdf');
|
||||
|
||||
SET session sort_buffer_size=8192;
|
||||
|
||||
SELECT (SELECT 1 FROM t1 WHERE t1.a=t2.a ORDER BY t1.b LIMIT 1) AS d1 FROM t2;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
#
|
||||
|
@@ -1,8 +1,9 @@
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# BUG #10308: purge log with subselect
|
||||
# BUG#10308: purge log with subselect
|
||||
# Bug#28553: mysqld crash in "purge master log before(select time from information_schema)"
|
||||
#
|
||||
|
||||
--error 1064
|
||||
purge master logs before (select adddate(current_timestamp(), interval -4 day));
|
||||
|
||||
purge master logs before adddate(current_timestamp(), interval -4 day);
|
||||
|
@@ -1763,6 +1763,9 @@ select * from t1;
|
||||
select * from t3;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
disconnect addconroot1;
|
||||
disconnect addconroot2;
|
||||
disconnect addconwithoutdb;
|
||||
#
|
||||
# Bug #26162: Trigger DML ignores low_priority_updates setting
|
||||
#
|
||||
@@ -1776,19 +1779,23 @@ INSERT INTO t2 VALUES (1),(2);
|
||||
CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW
|
||||
INSERT INTO t2 VALUES (new.id);
|
||||
|
||||
CONNECT (rl_holder, localhost, root,,);
|
||||
CONNECT (rl_acquirer, localhost, root,,);
|
||||
CONNECT (wl_acquirer, localhost, root,,);
|
||||
CONNECT (rl_contender, localhost, root,,);
|
||||
|
||||
SELECT GET_LOCK('B26162',20);
|
||||
CONNECTION rl_holder;
|
||||
SELECT GET_LOCK('B26162',120);
|
||||
|
||||
CONNECTION rl_acquirer;
|
||||
--send
|
||||
SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1;
|
||||
SELECT 'rl_acquirer', GET_LOCK('B26162',120), id FROM t2 WHERE id = 1;
|
||||
|
||||
CONNECTION wl_acquirer;
|
||||
SET SESSION LOW_PRIORITY_UPDATES=1;
|
||||
SET GLOBAL LOW_PRIORITY_UPDATES=1;
|
||||
#need to wait for rl_acquirer to lock on the B26162 lock
|
||||
sleep 2;
|
||||
--send
|
||||
INSERT INTO t1 VALUES (5);
|
||||
|
||||
@@ -1798,13 +1805,16 @@ CONNECTION rl_contender;
|
||||
--send
|
||||
SELECT 'rl_contender', id FROM t2 WHERE id > 1;
|
||||
|
||||
CONNECTION default;
|
||||
CONNECTION rl_holder;
|
||||
#need to wait for wl_acquirer and rl_contender to lock on t2
|
||||
sleep 2;
|
||||
SELECT RELEASE_LOCK('B26162');
|
||||
|
||||
CONNECTION wl_acquirer;
|
||||
--reap
|
||||
CONNECTION rl_acquirer;
|
||||
--reap
|
||||
SELECT RELEASE_LOCK('B26162');
|
||||
CONNECTION wl_acquirer;
|
||||
--reap
|
||||
CONNECTION rl_contender;
|
||||
--reap
|
||||
|
||||
@@ -1812,6 +1822,7 @@ CONNECTION default;
|
||||
DISCONNECT rl_acquirer;
|
||||
DISCONNECT wl_acquirer;
|
||||
DISCONNECT rl_contender;
|
||||
DISCONNECT rl_holder;
|
||||
|
||||
DROP TRIGGER t1_test;
|
||||
DROP TABLE t1,t2;
|
||||
|
@@ -272,6 +272,16 @@ select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
|
||||
select if(@bug28261 = f1, '', @bug28261:= f1) from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#28778: Wrong result of BETWEEN when comparing a DATETIME field with an
|
||||
# integer constants.
|
||||
#
|
||||
create table t1(f1 datetime);
|
||||
insert into t1 values('2001-01-01'),('2002-02-02');
|
||||
select * from t1 where f1 between 20020101 and 20070101000000;
|
||||
select * from t1 where f1 between 2002010 and 20070101000000;
|
||||
select * from t1 where f1 between 20020101 and 2007010100000;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test of storing datetime into date fields
|
||||
|
@@ -394,3 +394,17 @@ create table t1 as
|
||||
from (select 1 as s,'t' as t union select null, null ) as sub1;
|
||||
select group_concat(t) from t1 group by week(date)/10;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#28980: ROUND(<dec expr>, <int col>) returned double values
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
qty decimal(16,6) default NULL,
|
||||
dps tinyint(3) unsigned default NULL
|
||||
);
|
||||
INSERT INTO t1 VALUES (1.1325,3);
|
||||
|
||||
SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@@ -760,3 +760,9 @@ set global slow_launch_time =@my_slow_launch_time;
|
||||
set global storage_engine =@my_storage_engine;
|
||||
set global thread_cache_size =@my_thread_cache_size;
|
||||
|
||||
#
|
||||
# Bug#28580 Repeatation of status variables
|
||||
#
|
||||
--replace_column 2 #
|
||||
show global variables where Variable_name='table_definition_cache' or
|
||||
Variable_name='table_lock_wait_timeout';
|
||||
|
@@ -32,6 +32,7 @@ create view v1 (c,d) as select a,b from t1
|
||||
# simple view
|
||||
create view v1 (c) as select b+1 from t1;
|
||||
select c from v1;
|
||||
select is_updatable from information_schema.views where table_name='v1';
|
||||
|
||||
# temporary table should not hide table of view
|
||||
create temporary table t1 (a int, b int);
|
||||
@@ -228,6 +229,8 @@ create table t1 (a int, b int, primary key(a));
|
||||
insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
|
||||
create view v1 (a,c) as select a, b+1 from t1;
|
||||
create algorithm=temptable view v2 (a,c) as select a, b+1 from t1;
|
||||
select is_updatable from information_schema.views where table_name='v2';
|
||||
select is_updatable from information_schema.views where table_name='v1';
|
||||
# try to update expression
|
||||
-- error 1348
|
||||
update v1 set c=a+c;
|
||||
@@ -497,6 +500,7 @@ insert into t1 values(5,'Hello, world of views');
|
||||
create view v1 as select * from t1;
|
||||
create view v2 as select * from v1;
|
||||
update v2 set col2='Hello, view world';
|
||||
select is_updatable from information_schema.views;
|
||||
select * from t1;
|
||||
drop view v2, v1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user