mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
merge
This commit is contained in:
@@ -1354,3 +1354,15 @@ DROP i,
|
||||
ADD i INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
AUTO_INCREMENT = 1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a CHAR(1), PRIMARY KEY (a(255)));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
CREATE TABLE t1 (a CHAR(1));
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (a(20));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
ALTER TABLE t1 ADD KEY (a(20));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
CREATE UNIQUE INDEX i1 ON t1 (a(20));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
CREATE INDEX i2 ON t1 (a(20));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
DROP TABLE t1;
|
||||
|
@@ -3,7 +3,7 @@ create table t1 (a int check (a>0));
|
||||
insert into t1 values (1);
|
||||
insert into t1 values (0);
|
||||
drop table t1;
|
||||
create table t1 (a int ,b int, check a>b);
|
||||
create table t1 (a int, b int, check (a>b));
|
||||
insert into t1 values (1,0);
|
||||
insert into t1 values (0,1);
|
||||
drop table t1;
|
||||
@@ -27,3 +27,19 @@ t1 CREATE TABLE `t1` (
|
||||
UNIQUE KEY `key_2` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
drop table if exists t_illegal;
|
||||
create table t_illegal (a int, b int, check a>b);
|
||||
ERROR 42000: 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 'a>b)' at line 1
|
||||
create table t_illegal (a int, b int, constraint abc check a>b);
|
||||
ERROR 42000: 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 'a>b)' at line 1
|
||||
create table t_illegal (a int, b int, constraint abc);
|
||||
ERROR 42000: 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
|
||||
drop table if exists t_11714;
|
||||
create table t_11714(a int, b int);
|
||||
alter table t_11714 add constraint cons1;
|
||||
ERROR 42000: 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
|
||||
drop table t_11714;
|
||||
CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
|
||||
ERROR 42000: 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 'something (whatever))' at line 1
|
||||
CREATE TABLE t_illegal (col_1 INT CHECK something);
|
||||
ERROR 42000: 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 'something)' at line 1
|
||||
|
@@ -13,3 +13,45 @@ foreign key (a,b) references t3 (c,d) on update set null);
|
||||
create index a on t1 (a);
|
||||
create unique index b on t1 (a,b);
|
||||
drop table t1;
|
||||
drop table if exists t_34455;
|
||||
create table t_34455 (
|
||||
a int not null,
|
||||
foreign key (a) references t3 (a) match full match partial);
|
||||
ERROR 42000: 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 'match partial)' at line 3
|
||||
create table t_34455 (
|
||||
a int not null,
|
||||
foreign key (a) references t3 (a) on delete set default match full);
|
||||
ERROR 42000: 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 'match full)' at line 3
|
||||
create table t_34455 (
|
||||
a int not null,
|
||||
foreign key (a) references t3 (a) on update set default match full);
|
||||
ERROR 42000: 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 'match full)' at line 3
|
||||
create table t_34455 (
|
||||
a int not null,
|
||||
foreign key (a) references t3 (a)
|
||||
on delete set default on delete set default);
|
||||
ERROR 42000: 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 'delete set default)' at line 4
|
||||
create table t_34455 (
|
||||
a int not null,
|
||||
foreign key (a) references t3 (a)
|
||||
on update set default on update set default);
|
||||
ERROR 42000: 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 'update set default)' at line 4
|
||||
create table t_34455 (a int not null);
|
||||
alter table t_34455
|
||||
add foreign key (a) references t3 (a) match full match partial);
|
||||
ERROR 42000: 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 'match partial)' at line 2
|
||||
alter table t_34455
|
||||
add foreign key (a) references t3 (a) on delete set default match full);
|
||||
ERROR 42000: 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 'match full)' at line 2
|
||||
alter table t_34455
|
||||
add foreign key (a) references t3 (a) on update set default match full);
|
||||
ERROR 42000: 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 'match full)' at line 2
|
||||
alter table t_34455
|
||||
add foreign key (a) references t3 (a)
|
||||
on delete set default on delete set default);
|
||||
ERROR 42000: 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 'delete set default)' at line 3
|
||||
alter table t_34455
|
||||
add foreign key (a) references t3 (a)
|
||||
on update set default on update set default);
|
||||
ERROR 42000: 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 'update set default)' at line 3
|
||||
drop table t_34455;
|
||||
|
@@ -1058,3 +1058,33 @@ SELECT Polygon(12345123,'');
|
||||
Polygon(12345123,'')
|
||||
NULL
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP,
|
||||
SPATIAL INDEX i1 (col0)
|
||||
) ENGINE=MyISAM;
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
CREATE TABLE t1 (
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP
|
||||
) ENGINE=MyISAM;
|
||||
CREATE SPATIAL INDEX idx0 ON t1(col0);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
CREATE TABLE t2 (
|
||||
col0 INTEGER NOT NULL,
|
||||
col1 POINT,
|
||||
col2 POINT
|
||||
);
|
||||
CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
CREATE TABLE t3 (
|
||||
col0 INTEGER NOT NULL,
|
||||
col1 POINT,
|
||||
col2 LINESTRING,
|
||||
SPATIAL INDEX i1 (col1, col2)
|
||||
);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
@@ -2686,7 +2686,7 @@ a c COUNT(DISTINCT c, a, b)
|
||||
1 1 1
|
||||
1 1 1
|
||||
1 1 1
|
||||
2 1 1
|
||||
1 1 1
|
||||
2 1 1
|
||||
2 1 1
|
||||
2 1 1
|
||||
@@ -2714,7 +2714,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range NULL a 10 NULL 9 Using index for group-by
|
||||
SELECT a, COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
|
||||
a COUNT(DISTINCT b) SUM(DISTINCT b)
|
||||
2 8 36
|
||||
1 8 36
|
||||
2 8 36
|
||||
EXPLAIN SELECT COUNT(DISTINCT b), SUM(DISTINCT b) FROM t2 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@@ -2761,7 +2761,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
|
||||
126
|
||||
126
|
||||
126
|
||||
168
|
||||
126
|
||||
168
|
||||
168
|
||||
168
|
||||
@@ -2779,3 +2779,24 @@ SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
||||
10
|
||||
DROP TABLE t1,t2;
|
||||
# end of WL#3220 tests
|
||||
#
|
||||
# Bug#50539: Wrong result when loose index scan is used for an aggregate
|
||||
# function with distinct
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
f1 int(11) NOT NULL DEFAULT '0',
|
||||
f2 char(1) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (f1,f2)
|
||||
) ;
|
||||
insert into t1 values(1,'A'),(1 , 'B'), (1, 'C'), (2, 'A'),
|
||||
(3, 'A'), (3, 'B'), (3, 'C'), (3, 'D');
|
||||
SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
|
||||
f1 COUNT(DISTINCT f2)
|
||||
1 3
|
||||
2 1
|
||||
3 4
|
||||
explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range NULL PRIMARY 5 NULL 9 Using index for group-by (scanning)
|
||||
drop table t1;
|
||||
# End of test#50539.
|
||||
|
@@ -1,32 +0,0 @@
|
||||
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||
Grants for testuser@127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||
SET @nip= inet_aton('127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
2130706433
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
127.0.0.1
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@127.0.0.1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@127.0.0.1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@127.0.0.1
|
||||
DROP USER testuser1@'127.0.0.1';
|
||||
=============Test of '::1' ========================
|
||||
connect (con1, ::1, root, , test, MASTER_MYPORT);
|
||||
Got one of the listed errors
|
@@ -86,179 +86,3 @@ SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0:0:0:0:0:0:1';
|
||||
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||
Grants for testuser@127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||
SET @nip= inet_aton('127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
2130706433
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
127.0.0.1
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1' ===================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0::0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0::0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0::0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================
|
||||
=============Test of '::FFFF:127.0.0.1' ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1';
|
||||
Grants for testuser@::FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('::FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'::FFFF:127.0.0.1';
|
||||
=============Test of '::FFFF:127.0.0.1/96' ========================
|
||||
|
@@ -1,88 +0,0 @@
|
||||
=============Test of '::1' ========================================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::1';
|
||||
SHOW GRANTS FOR testuser@'::1';
|
||||
Grants for testuser@::1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1'
|
||||
SET @nip= inet_aton('::1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::1';
|
||||
RENAME USER testuser@'::1' to testuser1@'::1';
|
||||
SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'::1';
|
||||
=============Test of '::1/128' ====================================
|
||||
=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
=============Test of '0:0:0:0:0:0:0:1' ============================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1';
|
||||
Grants for testuser@0:0:0:0:0:0:0:1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:0:0:1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1';
|
||||
RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'0:0:0:0:0:0:0:1';
|
10
mysql-test/r/show_profile.result
Normal file
10
mysql-test/r/show_profile.result
Normal file
@@ -0,0 +1,10 @@
|
||||
SET profiling = 1;
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
SHOW PROFILES;
|
||||
Query_ID Duration Query
|
||||
1 # SELECT 1
|
||||
SHOW PROFILE FOR QUERY 1;
|
||||
SHOW PROFILE CPU FOR QUERY 1;
|
||||
SET profiling = 0;
|
Reference in New Issue
Block a user