mirror of
https://github.com/MariaDB/server.git
synced 2025-11-16 20:23:18 +03:00
merge
configure.in: Auto merged ndb/include/ndbapi/NdbApi.hpp: Auto merged ndb/include/ndbapi/NdbReceiver.hpp: Auto merged ndb/include/transporter/TransporterRegistry.hpp: Auto merged ndb/src/common/logger/Logger.cpp: Auto merged ndb/src/common/mgmcommon/IPCConfig.cpp: Auto merged ndb/src/common/transporter/Transporter.hpp: Auto merged ndb/src/kernel/main.cpp: Auto merged ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged ndb/src/mgmsrv/main.cpp: Auto merged ndb/src/ndbapi/Ndb.cpp: Auto merged ndb/src/ndbapi/NdbBlob.cpp: Auto merged ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged ndb/src/ndbapi/NdbTransaction.cpp: Auto merged ndb/src/ndbapi/Ndbinit.cpp: Auto merged ndb/test/ndbapi/testBlobs.cpp: Auto merged
This commit is contained in:
@@ -376,3 +376,13 @@ insert into t1 values ('x,y');
|
||||
insert into t1 values ('x,y,z,<2C>,<2C>,<2C>');
|
||||
select a, hex(a) from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#7302 UCS2 data in ENUM fields get truncated when new column is added
|
||||
#
|
||||
create table t1(a enum('a','b','c')) default character set ucs2;
|
||||
insert into t1 values('a'),('b'),('c');
|
||||
alter table t1 add b char(1);
|
||||
show warnings;
|
||||
select * from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
@@ -166,6 +166,8 @@ select date,format,cast(str_to_date(date, format) as datetime) as datetime from
|
||||
select date,format,DATE(str_to_date(date, format)) as date2 from t1;
|
||||
select date,format,TIME(str_to_date(date, format)) as time from t1;
|
||||
select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
|
||||
# Test small bug in %f handling
|
||||
select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'));
|
||||
|
||||
# Test wrong dates or converion specifiers
|
||||
|
||||
|
||||
@@ -51,3 +51,10 @@ SELECT ASIN(1.2-0.2);
|
||||
#select floor(log(16)/log(2));
|
||||
|
||||
explain extended select degrees(pi()),radians(360);
|
||||
|
||||
#
|
||||
# Bug #7281: problem with rand()
|
||||
#
|
||||
|
||||
--error 1054
|
||||
select rand(rand);
|
||||
|
||||
@@ -429,3 +429,17 @@ create table t1 (a int not null primary key, b varchar(40), c datetime);
|
||||
insert into t1 (a,b,c) values (1,'Tom','2004-12-10 12:13:14'),(2,'ball games','2004-12-10 12:13:14'), (3,'Basil','2004-12-10 12:13:14'), (4,'Dean','2004-12-10 12:13:14'),(5,'Ellis','2004-12-10 12:13:14'), (6,'Serg','2004-12-10 12:13:14'), (7,'Sergei','2004-12-10 12:13:14'),(8,'Georg','2004-12-10 12:13:14'),(9,'Salle','2004-12-10 12:13:14'),(10,'Sinisa','2004-12-10 12:13:14');
|
||||
select count(*) as total, left(c,10) as reg from t1 group by reg order by reg desc limit 0,12;
|
||||
drop table t1;
|
||||
# crashing bug with QUOTE() and LTRIM() or TRIM() fixed
|
||||
# Bug #7495
|
||||
#
|
||||
|
||||
select quote(ltrim(concat(' ', 'a')));
|
||||
select quote(trim(concat(' ', 'a')));
|
||||
|
||||
#
|
||||
# Bug#7455 unexpected result: TRIM(<NULL> FROM <whatever>) gives NOT NULL
|
||||
# According to ANSI if one of the TRIM arguments is NULL, then the result
|
||||
# must be NULL too.
|
||||
#
|
||||
select trim(null from 'kate') as "must_be_null";
|
||||
select trim('xyz' from null) as "must_be_null";
|
||||
|
||||
@@ -32,6 +32,23 @@ show grants for mysqltest_1@localhost;
|
||||
delete from mysql.user where user='mysqltest_1';
|
||||
flush privileges;
|
||||
|
||||
#
|
||||
# Test of GRANTS specifying user limits
|
||||
#
|
||||
delete from mysql.user where user='mysqltest_1';
|
||||
flush privileges;
|
||||
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10;
|
||||
select * from mysql.user where user="mysqltest_1";
|
||||
show grants for mysqltest_1@localhost;
|
||||
grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30;
|
||||
select * from mysql.user where user="mysqltest_1";
|
||||
show grants for mysqltest_1@localhost;
|
||||
# This is just to double check that one won't ignore results of selects
|
||||
flush privileges;
|
||||
show grants for mysqltest_1@localhost;
|
||||
delete from mysql.user where user='mysqltest_1';
|
||||
flush privileges;
|
||||
|
||||
#
|
||||
# Test that the new db privileges are stored/retrieved correctly
|
||||
#
|
||||
|
||||
@@ -59,10 +59,9 @@ flush privileges;
|
||||
use mysqltest;
|
||||
create table t1 (id int primary key, data varchar(255));
|
||||
|
||||
connect (mrbad, localhost, mysqltest_1,,);
|
||||
connect (mrbad, localhost, mysqltest_1,,mysqltest);
|
||||
connection mrbad;
|
||||
show grants for current_user();
|
||||
use mysqltest;
|
||||
insert into t1 values (1, 'I can''t change it!');
|
||||
--error 1142
|
||||
update t1 set data='I can change it!' where id = 1;
|
||||
@@ -70,14 +69,35 @@ update t1 set data='I can change it!' where id = 1;
|
||||
--error 1142
|
||||
insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!';
|
||||
select * from t1;
|
||||
disconnect mrbad;
|
||||
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop database mysqltest;
|
||||
use test;
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
#
|
||||
#
|
||||
create table t1 (a int, b int);
|
||||
grant select (a) on t1 to mysqltest_1@localhost with grant option;
|
||||
connect (mrugly, localhost, mysqltest_1,,mysqltest);
|
||||
connection mrugly;
|
||||
--error 1143
|
||||
grant select (a,b) on t1 to mysqltest_2@localhost;
|
||||
--error 1142
|
||||
grant select on t1 to mysqltest_3@localhost;
|
||||
disconnect mrugly;
|
||||
|
||||
connection default;
|
||||
drop table t1;
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
delete from mysql.columns_priv where user like 'mysqltest\_%';
|
||||
flush privileges;
|
||||
|
||||
drop database mysqltest;
|
||||
use test;
|
||||
|
||||
#
|
||||
# Create and drop user
|
||||
@@ -226,4 +246,3 @@ connection default;
|
||||
drop user mysqltest_B@'%';
|
||||
drop user mysqltest_3@localhost;
|
||||
#
|
||||
|
||||
|
||||
@@ -303,5 +303,8 @@ select a,b,c from t3 force index (a) where a=1 order by a,b,c;
|
||||
explain select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
|
||||
select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;
|
||||
|
||||
# BUG#7377 SHOW index on MERGE table crashes debug server
|
||||
show index from t3;
|
||||
|
||||
drop table t1, t2, t3;
|
||||
|
||||
|
||||
@@ -434,6 +434,7 @@ delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2
|
||||
drop table t1,t2;
|
||||
|
||||
# Test for BUG#5837 - delete with outer join and const tables
|
||||
--disable_warnings
|
||||
create table t1 (
|
||||
aclid bigint not null primary key,
|
||||
status tinyint(1) not null
|
||||
@@ -443,6 +444,7 @@ create table t2 (
|
||||
refid bigint not null primary key,
|
||||
aclid bigint, index idx_acl(aclid)
|
||||
) engine = innodb;
|
||||
--enable_warnings
|
||||
insert into t2 values(1,null);
|
||||
delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1';
|
||||
drop table t1, t2;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, `"t"1`;
|
||||
drop database if exists mysqldump_test_db;
|
||||
--enable_warnings
|
||||
|
||||
# XML output
|
||||
@@ -146,3 +147,31 @@ drop table t1;
|
||||
create database mysqldump_test_db character set latin2 collate latin2_bin;
|
||||
--exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db;
|
||||
drop database mysqldump_test_db;
|
||||
|
||||
#
|
||||
# Bug #7020
|
||||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||||
# but use the default compiled values, or the values given in
|
||||
# --default-character-set=xxx. However, we should dump in UTF8
|
||||
# if it is explicitely set.
|
||||
|
||||
CREATE TABLE t1 (a CHAR(10));
|
||||
INSERT INTO t1 VALUES (_latin1 '<27><><EFBFBD><EFBFBD>');
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
|
||||
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# WL #2319: Exclude Tables from dump
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t2 VALUES (4),(5),(6);
|
||||
--exec $MYSQL_DUMP --skip-comments --ignore-table=test.t1 test
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
||||
@@ -389,3 +389,17 @@ set autocommit=1;
|
||||
alter table t1 engine=myisam;
|
||||
select * from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
# -- bug #7340 --
|
||||
create table t1 (
|
||||
id int(11) unsigned primary key NOT NULL auto_increment,
|
||||
msg text NOT NULL
|
||||
) engine=ndbcluster default charset=utf8;
|
||||
insert into t1 (msg) values(
|
||||
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
|
||||
Fast fix: removed validation for Text. It is not yet indexable
|
||||
so bad data will not crash kernel.
|
||||
Proper fix: Set inline bytes to multiple of mbmaxlen and
|
||||
validate it (after the 8 byte length).');
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -894,7 +894,7 @@ drop table t1;
|
||||
#
|
||||
# IN optimisation test results
|
||||
#
|
||||
create table t1 (s1 char(5), index s1(s1));
|
||||
create table t1 (s1 char(5) not null, index s1(s1));
|
||||
create table t2 (s1 char(5), index s1(s1));
|
||||
insert into t1 values ('a1'),('a2'),('a3');
|
||||
insert into t2 values ('a1'),('a2');
|
||||
@@ -1391,3 +1391,29 @@ INSERT INTO t1 VALUES ('UMI','United States Minor Outlying Islands','Oceania','M
|
||||
/*!40000 ALTER TABLE t1 ENABLE KEYS */;
|
||||
SELECT DISTINCT Continent AS c FROM t1 WHERE Code <> SOME ( SELECT Code FROM t1 WHERE Continent = c AND Population < 200);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test cases for bug #7351:
|
||||
# quantified predicate with subquery returning empty result set
|
||||
#
|
||||
|
||||
CREATE TABLE t1 ( f1 BIGINT );
|
||||
INSERT INTO t1 SET f1= NULL;
|
||||
INSERT INTO t1 SET f1= 1;
|
||||
CREATE TABLE t2 ( f1 BIGINT );
|
||||
|
||||
SELECT f1 FROM t1
|
||||
WHERE f1 <> ALL ( SELECT f1 FROM t2 );
|
||||
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
|
||||
SELECT f1 FROM t1
|
||||
WHERE f1 <> ALL ( SELECT f1 FROM t2 WHERE f1 > 2 );
|
||||
|
||||
SELECT f1 FROM t1
|
||||
WHERE f1 <> ALL ( SELECT f1 FROM t2 WHERE f1 > 2
|
||||
UNION
|
||||
SELECT f1 FROM t2 WHERE f1 > 3);
|
||||
|
||||
SELECT f1 FROM t1
|
||||
WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000);
|
||||
|
||||
@@ -89,7 +89,7 @@ set global timed_mutexes=0;
|
||||
show variables like 'timed_mutexes';
|
||||
|
||||
|
||||
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="INNODB";
|
||||
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
|
||||
show local variables like 'storage_engine';
|
||||
show global variables like 'storage_engine';
|
||||
set GLOBAL query_cache_size=100000;
|
||||
@@ -146,7 +146,7 @@ set max_join_size="hello";
|
||||
--error 1286
|
||||
set storage_engine=UNKNOWN_TABLE_TYPE;
|
||||
--error 1231
|
||||
set storage_engine=INNODB, big_tables=2;
|
||||
set storage_engine=MERGE, big_tables=2;
|
||||
show local variables like 'storage_engine';
|
||||
--error 1229
|
||||
set SESSION query_cache_size=10000;
|
||||
|
||||
Reference in New Issue
Block a user