mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint client/mysql.cc: Auto merged mysql-test/r/grant.result: Auto merged mysql-test/t/grant.test: Auto merged sql/mysqld.cc: Auto merged
This commit is contained in:
@@ -232,7 +232,7 @@ a b
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=6;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4
|
||||
update t1 set a=300 where b=7;
|
||||
SET SQL_MODE='';
|
||||
insert into t1(a,b)values(NULL,8);
|
||||
@@ -274,7 +274,7 @@ a b
|
||||
delete from t1 where a=0;
|
||||
update t1 set a=NULL where b=13;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 9
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 9
|
||||
update t1 set a=500 where b=14;
|
||||
select * from t1 order by b;
|
||||
a b
|
||||
|
||||
@@ -13,7 +13,7 @@ Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
insert into t1 values (""),(null);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
|
||||
select * from t1;
|
||||
b
|
||||
|
||||
|
||||
@@ -42,3 +42,11 @@ id str
|
||||
6 aaaaaa
|
||||
7 aaaaaaa
|
||||
drop table t1;
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefgh<67>");
|
||||
insert into t1 values("<22><><EFBFBD><EFBFBD>");
|
||||
select a from t1 where a like "abcdefgh<67>";
|
||||
a
|
||||
abcdefgh<EFBFBD>
|
||||
drop table t1;
|
||||
|
||||
@@ -1281,6 +1281,22 @@ id tid val
|
||||
42749 72 VOLN<4C> ADSL
|
||||
44205 72 VOLN<4C> ADSL
|
||||
DROP TABLE t1;
|
||||
create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
|
||||
default charset=utf8 collate=utf8_unicode_ci;
|
||||
insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
|
||||
explain select distinct a from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary
|
||||
select distinct a from t1;
|
||||
a
|
||||
e
|
||||
explain select a from t1 group by a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
|
||||
select a from t1 group by a;
|
||||
a
|
||||
e
|
||||
drop table t1;
|
||||
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
|
||||
SELECT id FROM t1;
|
||||
|
||||
@@ -1788,6 +1788,33 @@ length(a)
|
||||
5000
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
DROP TABLE IF EXISTS federated.test;
|
||||
CREATE TABLE federated.test (
|
||||
`i` int(11) NOT NULL,
|
||||
`j` int(11) NOT NULL,
|
||||
`c` varchar(30) default NULL,
|
||||
PRIMARY KEY (`i`,`j`),
|
||||
UNIQUE KEY `i` (`i`,`c`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
DROP TABLE IF EXISTS federated.test1;
|
||||
DROP TABLE IF EXISTS federated.test2;
|
||||
create table federated.test1 (
|
||||
i int not null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
primary key (i,j),
|
||||
unique key (i, c))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
|
||||
create table federated.test2 (
|
||||
i int default null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
key (i))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
|
||||
drop table federated.test1, federated.test2;
|
||||
drop table federated.test;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
|
||||
@@ -426,6 +426,7 @@ revoke all on mysqltest_2.t1 from mysqltest_3@localhost;
|
||||
revoke all on mysqltest_2.t2 from mysqltest_3@localhost;
|
||||
grant all on mysqltest_2.* to mysqltest_3@localhost;
|
||||
grant select on *.* to mysqltest_3@localhost;
|
||||
grant select on mysqltest_2.t1 to mysqltest_3@localhost;
|
||||
flush privileges;
|
||||
use mysqltest_1;
|
||||
update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600;
|
||||
|
||||
@@ -118,6 +118,16 @@ flush privileges;
|
||||
drop user mysqltest_3@host3;
|
||||
drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
|
||||
mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
|
||||
create database mysqltest_1;
|
||||
grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
|
||||
set sql_log_off = 1;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
set sql_log_bin = 0;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
delete from mysql.user where user like 'mysqltest\_1';
|
||||
delete from mysql.db where user like 'mysqltest\_1';
|
||||
drop database mysqltest_1;
|
||||
flush privileges;
|
||||
set sql_mode='maxdb';
|
||||
drop table if exists t1, t2;
|
||||
create table t1(c1 int);
|
||||
|
||||
@@ -246,6 +246,41 @@ DELETE from t1 where a < 100;
|
||||
SELECT * from t1;
|
||||
a
|
||||
DROP TABLE t1;
|
||||
create table t1(a int not null, key using btree(a)) engine=heap;
|
||||
insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
|
||||
select a from t1 where a > 2 order by a;
|
||||
a
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
delete from t1 where a < 4;
|
||||
select a from t1 order by a;
|
||||
a
|
||||
insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
|
||||
select a from t1 where a > 4 order by a;
|
||||
a
|
||||
delete from t1 where a > 4;
|
||||
select a from t1 order by a;
|
||||
a
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
select a from t1 where a > 3 order by a;
|
||||
a
|
||||
delete from t1 where a >= 2;
|
||||
select a from t1 order by a;
|
||||
a
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
|
||||
|
||||
@@ -63,7 +63,7 @@ insert into t1 values(NULL);
|
||||
ERROR 23000: Column 'id' cannot be null
|
||||
insert into t1 values (1), (NULL), (2);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id' at row 2
|
||||
select * from t1;
|
||||
id
|
||||
1
|
||||
|
||||
@@ -606,8 +606,8 @@ NULL 2 100
|
||||
create table t2(No int not null, Field int not null, Count int not null);
|
||||
insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 2
|
||||
select * from t2;
|
||||
No Field Count
|
||||
0 1 100
|
||||
|
||||
@@ -159,8 +159,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
|
||||
UNIQUE (c,i));
|
||||
INSERT INTO t1 (c) VALUES (NULL),(NULL);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2
|
||||
SELECT * FROM t1;
|
||||
c i
|
||||
1
|
||||
|
||||
@@ -2,6 +2,54 @@
|
||||
1
|
||||
ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
||||
ERROR at line 1: USE must be followed by a database name
|
||||
? (\?) Synonym for `help'.
|
||||
clear (\c) Clear command.
|
||||
connect (\r) Reconnect to the server. Optional arguments are db and host.
|
||||
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
|
||||
edit (\e) Edit command with $EDITOR.
|
||||
ego (\G) Send command to mysql server, display result vertically.
|
||||
exit (\q) Exit mysql. Same as quit.
|
||||
go (\g) Send command to mysql server.
|
||||
help (\h) Display this help.
|
||||
nopager (\n) Disable pager, print to stdout.
|
||||
notee (\t) Don't write into outfile.
|
||||
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
|
||||
print (\p) Print current command.
|
||||
prompt (\R) Change your mysql prompt.
|
||||
quit (\q) Quit mysql.
|
||||
rehash (\#) Rebuild completion hash.
|
||||
source (\.) Execute an SQL script file. Takes a file name as an argument.
|
||||
status (\s) Get status information from the server.
|
||||
system (\!) Execute a system shell command.
|
||||
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
|
||||
use (\u) Use another database. Takes database name as argument.
|
||||
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
|
||||
warnings (\W) Show warnings after every statement.
|
||||
nowarning (\w) Don't show warnings after every statement.
|
||||
? (\?) Synonym for `help'.
|
||||
clear (\c) Clear command.
|
||||
connect (\r) Reconnect to the server. Optional arguments are db and host.
|
||||
delimiter (\d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.
|
||||
edit (\e) Edit command with $EDITOR.
|
||||
ego (\G) Send command to mysql server, display result vertically.
|
||||
exit (\q) Exit mysql. Same as quit.
|
||||
go (\g) Send command to mysql server.
|
||||
help (\h) Display this help.
|
||||
nopager (\n) Disable pager, print to stdout.
|
||||
notee (\t) Don't write into outfile.
|
||||
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
|
||||
print (\p) Print current command.
|
||||
prompt (\R) Change your mysql prompt.
|
||||
quit (\q) Quit mysql.
|
||||
rehash (\#) Rebuild completion hash.
|
||||
source (\.) Execute an SQL script file. Takes a file name as an argument.
|
||||
status (\s) Get status information from the server.
|
||||
system (\!) Execute a system shell command.
|
||||
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
|
||||
use (\u) Use another database. Takes database name as argument.
|
||||
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
|
||||
warnings (\W) Show warnings after every statement.
|
||||
nowarning (\w) Don't show warnings after every statement.
|
||||
\
|
||||
\\
|
||||
';
|
||||
|
||||
@@ -2876,7 +2876,7 @@ drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_dbb;
|
||||
use test;
|
||||
create user mysqltest_1;
|
||||
create user mysqltest_1@localhost;
|
||||
create table t1(a int, b varchar(34));
|
||||
reset master;
|
||||
mysqldump: Couldn't execute 'FLUSH TABLES': Access denied; you need the RELOAD privilege for this operation (1227)
|
||||
@@ -2891,4 +2891,4 @@ CREATE TABLE `t1` (
|
||||
`b` varchar(34) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
drop table t1;
|
||||
drop user mysqltest_1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
@@ -64,17 +64,26 @@ pk u o
|
||||
insert into t1 values (1,1,1);
|
||||
drop table t1;
|
||||
create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb;
|
||||
insert into t1 values (1,'one',1), (2,'two',2),(3,"three",3);
|
||||
insert into t1 values (1,'one',1);
|
||||
begin;
|
||||
select * from t1 where x = 1 for update;
|
||||
x y z
|
||||
1 one 1
|
||||
begin;
|
||||
select * from t1 where x = 1 for update;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rollback;
|
||||
rollback;
|
||||
insert into t1 values (2,'two',2),(3,"three",3);
|
||||
begin;
|
||||
select * from t1 where x = 1 for update;
|
||||
x y z
|
||||
1 one 1
|
||||
select * from t1 where x = 1 for update;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1 where x = 2 for update;
|
||||
x y z
|
||||
2 two 2
|
||||
select * from t1 where x = 1 for update;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
rollback;
|
||||
commit;
|
||||
begin;
|
||||
|
||||
@@ -97,39 +97,39 @@ Warnings:
|
||||
Warning 1265 Data truncated for column 'd' at row 1
|
||||
UPDATE t1 SET d=NULL;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1
|
||||
INSERT INTO t1 (a) values (null);
|
||||
ERROR 23000: Column 'a' cannot be null
|
||||
INSERT INTO t1 (a) values (1/null);
|
||||
ERROR 23000: Column 'a' cannot be null
|
||||
INSERT INTO t1 (a) values (null),(null);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
|
||||
INSERT INTO t1 (b) values (null);
|
||||
ERROR 23000: Column 'b' cannot be null
|
||||
INSERT INTO t1 (b) values (1/null);
|
||||
ERROR 23000: Column 'b' cannot be null
|
||||
INSERT INTO t1 (b) values (null),(null);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
|
||||
INSERT INTO t1 (c) values (null);
|
||||
ERROR 23000: Column 'c' cannot be null
|
||||
INSERT INTO t1 (c) values (1/null);
|
||||
ERROR 23000: Column 'c' cannot be null
|
||||
INSERT INTO t1 (c) values (null),(null);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2
|
||||
INSERT INTO t1 (d) values (null);
|
||||
ERROR 23000: Column 'd' cannot be null
|
||||
INSERT INTO t1 (d) values (1/null);
|
||||
ERROR 23000: Column 'd' cannot be null
|
||||
INSERT INTO t1 (d) values (null),(null);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 2
|
||||
select * from t1;
|
||||
a b c d
|
||||
0 0000-00-00 00:00:00 0
|
||||
|
||||
@@ -342,7 +342,7 @@ index (id2)
|
||||
);
|
||||
insert into t1 values(null,null),(1,1);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id2' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id2' at row 1
|
||||
select * from t1;
|
||||
id id2
|
||||
NULL 0
|
||||
|
||||
@@ -1304,7 +1304,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -1288,7 +1288,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -1330,7 +1330,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
@@ -4344,7 +4344,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -1287,7 +1287,7 @@ set @arg00=NULL;
|
||||
set @arg01=2;
|
||||
execute stmt1 using @arg00, @arg01;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
select a,b from t1 order by a;
|
||||
a b
|
||||
0 two
|
||||
|
||||
@@ -41,3 +41,14 @@ Table Op Msg_type Msg_text
|
||||
test.t1 repair warning Number of rows changed from 0 to 1
|
||||
test.t1 repair status OK
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a INT, KEY(a));
|
||||
INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
|
||||
SET myisam_repair_threads=2;
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SHOW INDEX FROM t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 1 a 1 a A 5 NULL NULL YES BTREE
|
||||
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -997,16 +997,16 @@ ERROR 23000: Column 'col2' cannot be null
|
||||
INSERT INTO t1 VALUES (103,'',NULL);
|
||||
ERROR 23000: Column 'col3' cannot be null
|
||||
UPDATE t1 SET col1=NULL WHERE col1 =100;
|
||||
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
|
||||
ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
|
||||
UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
|
||||
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
|
||||
ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
|
||||
UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
|
||||
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
|
||||
ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
|
||||
INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col3' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col3' at row 1
|
||||
SELECT * FROM t1;
|
||||
col1 col2 col3
|
||||
100 hello 2004-08-20
|
||||
@@ -1031,11 +1031,11 @@ ERROR HY000: Field 'col2' doesn't have a default value
|
||||
INSERT INTO t1 (col1) SELECT 1;
|
||||
ERROR HY000: Field 'col2' doesn't have a default value
|
||||
INSERT INTO t1 SELECT 1,NULL;
|
||||
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
|
||||
ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
|
||||
INSERT IGNORE INTO t1 values (NULL,NULL);
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1
|
||||
INSERT IGNORE INTO t1 (col1) values (3);
|
||||
Warnings:
|
||||
Warning 1364 Field 'col2' doesn't have a default value
|
||||
|
||||
@@ -1495,7 +1495,7 @@ insert into v3(b) values (10);
|
||||
insert into v3(a) select a from t2;
|
||||
insert into v3(b) select b from t2;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
|
||||
insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a);
|
||||
select * from t1;
|
||||
a b
|
||||
|
||||
@@ -72,7 +72,7 @@ drop table t1;
|
||||
create table t1(a tinyint, b int not null, c date, d char(5));
|
||||
load data infile '../std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ',';
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
|
||||
Warning 1265 Data truncated for column 'd' at row 3
|
||||
Warning 1265 Data truncated for column 'c' at row 4
|
||||
Warning 1261 Row 5 doesn't contain data for all columns
|
||||
@@ -86,7 +86,7 @@ drop table t1;
|
||||
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
|
||||
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'b' at row 2
|
||||
Warning 1265 Data truncated for column 'c' at row 2
|
||||
Warning 1264 Out of range value adjusted for column 'a' at row 3
|
||||
@@ -99,7 +99,7 @@ Warning 1265 Data truncated for column 'c' at row 2
|
||||
alter table t1 add d char(2);
|
||||
update t1 set a=NULL where a=10;
|
||||
Warnings:
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2
|
||||
update t1 set c='mysql ab' where c='test';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c' at row 4
|
||||
@@ -115,7 +115,7 @@ Warnings:
|
||||
Warning 1265 Data truncated for column 'b' at row 1
|
||||
Warning 1265 Data truncated for column 'b' at row 2
|
||||
Warning 1265 Data truncated for column 'b' at row 3
|
||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4
|
||||
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4
|
||||
Warning 1265 Data truncated for column 'b' at row 4
|
||||
insert into t2(b) values('mysqlab');
|
||||
Warnings:
|
||||
|
||||
@@ -44,4 +44,14 @@ INSERT INTO t1 VALUES (NULL, 'aaaaaaa');
|
||||
select * from t1 where str like 'aa%';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
|
||||
#
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefgh<67>");
|
||||
insert into t1 values("<22><><EFBFBD><EFBFBD>");
|
||||
select a from t1 where a like "abcdefgh<67>";
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
@@ -1026,6 +1026,20 @@ ALTER TABLE t1 ADD KEY idx (tid,val(11));
|
||||
SELECT * FROM t1 WHERE tid=72 and val LIKE 'VOLN<4C> ADSL';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug 20709: problem with utf8 fields in temporary tables
|
||||
#
|
||||
|
||||
create table t1(a char(200) collate utf8_unicode_ci NOT NULL default '')
|
||||
default charset=utf8 collate=utf8_unicode_ci;
|
||||
insert into t1 values (unhex('65')), (unhex('C3A9')), (unhex('65'));
|
||||
explain select distinct a from t1;
|
||||
select distinct a from t1;
|
||||
explain select a from t1 group by a;
|
||||
select a from t1 group by a;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
|
||||
@@ -1499,4 +1499,49 @@ drop table t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG #15133: unique index with nullable value not accepted in federated table
|
||||
#
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.test;
|
||||
CREATE TABLE federated.test (
|
||||
`i` int(11) NOT NULL,
|
||||
`j` int(11) NOT NULL,
|
||||
`c` varchar(30) default NULL,
|
||||
PRIMARY KEY (`i`,`j`),
|
||||
UNIQUE KEY `i` (`i`,`c`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
--enable_warnings
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS federated.test1;
|
||||
DROP TABLE IF EXISTS federated.test2;
|
||||
--enable_warnings
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.test1 (
|
||||
i int not null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
primary key (i,j),
|
||||
unique key (i, c))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval create table federated.test2 (
|
||||
i int default null,
|
||||
j int not null,
|
||||
c varchar(30),
|
||||
key (i))
|
||||
engine = federated
|
||||
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
|
||||
drop table federated.test1, federated.test2;
|
||||
|
||||
connection slave;
|
||||
drop table federated.test;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
||||
@@ -362,6 +362,8 @@ revoke all on mysqltest_2.t2 from mysqltest_3@localhost;
|
||||
#test the db/table level privileges
|
||||
grant all on mysqltest_2.* to mysqltest_3@localhost;
|
||||
grant select on *.* to mysqltest_3@localhost;
|
||||
# Next grant is needed to trigger bug#7391. Do not optimize!
|
||||
grant select on mysqltest_2.t1 to mysqltest_3@localhost;
|
||||
flush privileges;
|
||||
disconnect conn1;
|
||||
connect (conn2,localhost,mysqltest_3,,);
|
||||
|
||||
@@ -188,6 +188,24 @@ disconnect con9;
|
||||
connection default;
|
||||
|
||||
#
|
||||
# Bug# 16180 - Setting SQL_LOG_OFF without SUPER privilege is silently ignored
|
||||
#
|
||||
create database mysqltest_1;
|
||||
grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
|
||||
connect (con10,localhost,mysqltest_1,,);
|
||||
connection con10;
|
||||
--error 1227
|
||||
set sql_log_off = 1;
|
||||
--error 1227
|
||||
set sql_log_bin = 0;
|
||||
disconnect con10;
|
||||
connection default;
|
||||
delete from mysql.user where user like 'mysqltest\_1';
|
||||
delete from mysql.db where user like 'mysqltest\_1';
|
||||
drop database mysqltest_1;
|
||||
flush privileges;
|
||||
|
||||
# End of 4.1 tests
|
||||
# Create and drop user
|
||||
#
|
||||
set sql_mode='maxdb';
|
||||
|
||||
@@ -164,6 +164,26 @@ DELETE from t1 where a < 100;
|
||||
SELECT * from t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #9719: problem with delete
|
||||
#
|
||||
|
||||
create table t1(a int not null, key using btree(a)) engine=heap;
|
||||
insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
|
||||
select a from t1 where a > 2 order by a;
|
||||
delete from t1 where a < 4;
|
||||
select a from t1 order by a;
|
||||
insert into t1 values (2), (2), (2), (1), (1), (3), (3), (3), (3);
|
||||
select a from t1 where a > 4 order by a;
|
||||
delete from t1 where a > 4;
|
||||
select a from t1 order by a;
|
||||
select a from t1 where a > 3 order by a;
|
||||
delete from t1 where a >= 2;
|
||||
select a from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
#
|
||||
# BUG#18160 - Memory-/HEAP Table endless growing indexes
|
||||
#
|
||||
@@ -184,4 +204,3 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
|
||||
INSERT INTO t1 VALUES(NULL),(NULL);
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
--exec echo "use" > $MYSQLTEST_VARDIR/tmp/bug20432.sql
|
||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20432.sql 2>&1
|
||||
|
||||
#
|
||||
# Bug #20328: mysql client interprets commands in comments
|
||||
#
|
||||
--exec echo 'help' | $MYSQL
|
||||
--exec echo 'help ' | $MYSQL
|
||||
|
||||
#
|
||||
# Bug #20103: Escaping with backslash does not work
|
||||
#
|
||||
|
||||
@@ -1273,7 +1273,7 @@ drop database mysqldump_dbb;
|
||||
use test;
|
||||
|
||||
# Create user without sufficient privs to perform the requested operation
|
||||
create user mysqltest_1;
|
||||
create user mysqltest_1@localhost;
|
||||
create table t1(a int, b varchar(34));
|
||||
|
||||
# To get consistent output, reset the master, starts over from first log
|
||||
@@ -1308,4 +1308,4 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
||||
|
||||
# Clean up
|
||||
drop table t1;
|
||||
drop user mysqltest_1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
@@ -73,7 +73,7 @@ drop table t1;
|
||||
|
||||
create table t1 (x integer not null primary key, y varchar(32), z integer, key(z)) engine = ndb;
|
||||
|
||||
insert into t1 values (1,'one',1), (2,'two',2),(3,"three",3);
|
||||
insert into t1 values (1,'one',1);
|
||||
|
||||
# PK access
|
||||
connection con1;
|
||||
@@ -82,11 +82,22 @@ select * from t1 where x = 1 for update;
|
||||
|
||||
connection con2;
|
||||
begin;
|
||||
select * from t1 where x = 2 for update;
|
||||
--error 1205
|
||||
select * from t1 where x = 1 for update;
|
||||
rollback;
|
||||
|
||||
connection con1;
|
||||
rollback;
|
||||
insert into t1 values (2,'two',2),(3,"three",3);
|
||||
begin;
|
||||
select * from t1 where x = 1 for update;
|
||||
|
||||
connection con2;
|
||||
--error 1205
|
||||
select * from t1 where x = 1 for update;
|
||||
select * from t1 where x = 2 for update;
|
||||
rollback;
|
||||
|
||||
connection con1;
|
||||
commit;
|
||||
|
||||
|
||||
@@ -34,4 +34,15 @@ repair table t1;
|
||||
repair table t1 use_frm;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
|
||||
#
|
||||
CREATE TABLE t1(a INT, KEY(a));
|
||||
INSERT INTO t1 VALUES(1),(2),(3),(4),(5);
|
||||
SET myisam_repair_threads=2;
|
||||
REPAIR TABLE t1;
|
||||
SHOW INDEX FROM t1;
|
||||
SET myisam_repair_threads=@@global.myisam_repair_threads;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
Reference in New Issue
Block a user