mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt mysql-test/r/partition_range.result: Auto merged sql/sql_show.cc: Auto merged
This commit is contained in:
14
mysql-test/r/create_not_windows.result
Normal file
14
mysql-test/r/create_not_windows.result
Normal file
@ -0,0 +1,14 @@
|
||||
drop table if exists `about:text`;
|
||||
create table `about:text` (
|
||||
_id int not null auto_increment,
|
||||
`about:text` varchar(255) not null default '',
|
||||
primary key (_id)
|
||||
);
|
||||
show create table `about:text`;
|
||||
Table Create Table
|
||||
about:text CREATE TABLE `about:text` (
|
||||
`_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`about:text` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table `about:text`;
|
@ -7,20 +7,20 @@ period_add("9602",-12) period_diff(199505,"9404")
|
||||
199502 13
|
||||
select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now());
|
||||
now()-now() weekday(curdate())-weekday(now()) unix_timestamp()-unix_timestamp(now())
|
||||
0 0 0
|
||||
0.000000 0 0
|
||||
select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0;
|
||||
from_unixtime(unix_timestamp("1994-03-02 10:11:12")) from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s") from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0
|
||||
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112
|
||||
1994-03-02 10:11:12 1994-03-02 10:11:12 19940302101112.000000
|
||||
select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"),
|
||||
sec_to_time(time_to_sec("0:30:47")/6.21);
|
||||
sec_to_time(9001) sec_to_time(9001)+0 time_to_sec("15:12:22") sec_to_time(time_to_sec("0:30:47")/6.21)
|
||||
02:30:01 23001 54742 00:04:57
|
||||
02:30:01 23001.000000 54742 00:04:57
|
||||
select sec_to_time(time_to_sec('-838:59:59'));
|
||||
sec_to_time(time_to_sec('-838:59:59'))
|
||||
-838:59:59
|
||||
select now()-curdate()*1000000-curtime();
|
||||
now()-curdate()*1000000-curtime()
|
||||
0
|
||||
0.000000
|
||||
select strcmp(current_timestamp(),concat(current_date()," ",current_time()));
|
||||
strcmp(current_timestamp(),concat(current_date()," ",current_time()))
|
||||
0
|
||||
@ -751,6 +751,10 @@ select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
|
||||
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
|
||||
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
|
||||
NULL NULL January NULL
|
||||
select now() - now() + 0, curtime() - curtime() + 0,
|
||||
sec_to_time(1) + 0, from_unixtime(1) + 0;
|
||||
now() - now() + 0 curtime() - curtime() + 0 sec_to_time(1) + 0 from_unixtime(1) + 0
|
||||
0.000000 0.000000 1.000000 19700101030001.000000
|
||||
End of 4.1 tests
|
||||
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
|
||||
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
|
||||
|
@ -912,58 +912,62 @@ grant select (f1) on mysqltest.t1 to user1@localhost;
|
||||
grant select on mysqltest.t2 to user2@localhost;
|
||||
grant select on mysqltest.* to user3@localhost;
|
||||
grant select on *.* to user4@localhost;
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user1'@'localhost' NULL USAGE NO
|
||||
show grants;
|
||||
Grants for user1@localhost
|
||||
GRANT USAGE ON *.* TO 'user1'@'localhost'
|
||||
GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost'
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user2'@'localhost' NULL USAGE NO
|
||||
show grants;
|
||||
Grants for user2@localhost
|
||||
GRANT USAGE ON *.* TO 'user2'@'localhost'
|
||||
GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost'
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user3'@'localhost' NULL mysqltest SELECT NO
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user3'@'localhost' NULL USAGE NO
|
||||
show grants;
|
||||
Grants for user3@localhost
|
||||
GRANT USAGE ON *.* TO 'user3'@'localhost'
|
||||
GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost'
|
||||
select * from information_schema.column_privileges where grantee like '%user%';
|
||||
select * from information_schema.column_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO
|
||||
select * from information_schema.table_privileges where grantee like '%user%';
|
||||
select * from information_schema.table_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user2'@'localhost' NULL mysqltest t2 SELECT NO
|
||||
select * from information_schema.schema_privileges where grantee like '%user%';
|
||||
select * from information_schema.schema_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user3'@'localhost' NULL mysqltest SELECT NO
|
||||
select * from information_schema.user_privileges where grantee like '%user%';
|
||||
select * from information_schema.user_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
|
||||
'user1'@'localhost' NULL USAGE NO
|
||||
'user2'@'localhost' NULL USAGE NO
|
||||
@ -1154,14 +1158,6 @@ routine_name
|
||||
|
||||
delete from proc where name='';
|
||||
use test;
|
||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
MyISAM ENABLED Default engine as of MySQL 3.23 with great performance NO NO NO
|
||||
grant select on *.* to user3148@localhost;
|
||||
select user,db from information_schema.processlist;
|
||||
user db
|
||||
user3148 test
|
||||
drop user user3148@localhost;
|
||||
grant select on test.* to mysqltest_1@localhost;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
@ -1175,3 +1171,20 @@ NULL test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER
|
||||
drop view v1, v2;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
set @a:= '.';
|
||||
create table t1(f1 char(5));
|
||||
create table t2(f1 char(5));
|
||||
select concat(@a, table_name), @a, table_name
|
||||
from information_schema.tables where table_schema = 'test';
|
||||
concat(@a, table_name) @a table_name
|
||||
.t1 . t1
|
||||
.t2 . t2
|
||||
drop table t1,t2;
|
||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
|
||||
MyISAM ENABLED Default engine as of MySQL 3.23 with great performance NO NO NO
|
||||
grant select on *.* to user3148@localhost;
|
||||
select user,db from information_schema.processlist;
|
||||
user db
|
||||
user3148 test
|
||||
drop user user3148@localhost;
|
||||
|
@ -50,14 +50,6 @@ Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
CREATE DATABASE mysqltest_1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
DROP DATABASE mysqltest_1;
|
||||
DROP DATABASE mysqltest_1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
UNLOCK TABLES;
|
||||
DROP DATABASE mysqltest_1;
|
||||
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
||||
use mysql;
|
||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||
FLUSH TABLES;
|
||||
@ -74,3 +66,11 @@ Select_priv
|
||||
N
|
||||
use test;
|
||||
use test;
|
||||
CREATE DATABASE mysqltest_1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
DROP DATABASE mysqltest_1;
|
||||
DROP DATABASE mysqltest_1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
UNLOCK TABLES;
|
||||
DROP DATABASE mysqltest_1;
|
||||
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
||||
|
@ -165,3 +165,12 @@ create table t1Aa (col1 int);
|
||||
select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
|
||||
col1
|
||||
drop table t2aA, t1Aa;
|
||||
create database mysqltest_LC2;
|
||||
use mysqltest_LC2;
|
||||
create table myUC (i int);
|
||||
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
||||
where TABLE_SCHEMA ='mysqltest_LC2';
|
||||
TABLE_SCHEMA TABLE_NAME
|
||||
mysqltest_LC2 myUC
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
|
@ -320,8 +320,13 @@ LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||
truncate ndb_show_tables;
|
||||
alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
|
||||
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||
select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
|
||||
no_copy
|
||||
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||
truncate ndb_show_tables;
|
||||
create index i1 on t1(medium);
|
||||
alter table t1 add index i2(long_int);
|
||||
alter table t1 add index i2(new_tiny);
|
||||
drop index i1 on t1;
|
||||
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||
select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
|
||||
|
46
mysql-test/r/ndb_loaddatalocal.result
Normal file
46
mysql-test/r/ndb_loaddatalocal.result
Normal file
@ -0,0 +1,46 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
create table t1(a int) engine=myisam;
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int) engine=ndb;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
10000
|
||||
drop table t1;
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (2), (2), (3);
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
select * from t1 order by a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (1), (2), (3);
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
select * from t1 order by a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (2), (3), (3);
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
select * from t1 order by a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
drop table t1;
|
469
mysql-test/r/ndb_restore_partition.result
Normal file
469
mysql-test/r/ndb_restore_partition.result
Normal file
@ -0,0 +1,469 @@
|
||||
use test;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
CREATE TABLE `t1_c` (
|
||||
`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`goaledatta` char(2) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt');
|
||||
CREATE TABLE `t2_c` (
|
||||
`capgotod` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`gotod` smallint(5) unsigned NOT NULL default '0',
|
||||
`goaledatta` char(2) default NULL,
|
||||
`maturegarbagefa` varchar(32) default NULL,
|
||||
`descrpooppo` varchar(64) default NULL,
|
||||
`svcutonsa` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`capgotod`),
|
||||
KEY `i_quadaddsvr` (`gotod`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST');
|
||||
CREATE TABLE `t3_c` (
|
||||
`CapGoaledatta` smallint(5) unsigned NOT NULL default '0',
|
||||
`capgotod` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`capgotod`,`CapGoaledatta`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3);
|
||||
CREATE TABLE `t4_c` (
|
||||
`capfa` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`authpwchap` varchar(32) default NULL,
|
||||
`fa` varchar(32) NOT NULL default '',
|
||||
`payyingatta` tinyint(4) NOT NULL default '0',
|
||||
`status` char(1) default NULL,
|
||||
PRIMARY KEY (`fa`,`realm`),
|
||||
KEY `capfa` (`capfa`),
|
||||
KEY `i_quadentity` (`fa`,`realm`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL);
|
||||
CREATE TABLE `t5_c` (
|
||||
`capfa` bigint(20) unsigned NOT NULL default '0',
|
||||
`gotod` smallint(5) unsigned NOT NULL default '0',
|
||||
`orderutonsa` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,'');
|
||||
CREATE TABLE `t6_c` (
|
||||
`capfa_parent` bigint(20) unsigned NOT NULL default '0',
|
||||
`capfa_child` bigint(20) unsigned NOT NULL default '0',
|
||||
`relatta` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0);
|
||||
CREATE TABLE `t7_c` (
|
||||
`dardpo` char(15) NOT NULL default '',
|
||||
`dardtestard` tinyint(3) unsigned NOT NULL default '0',
|
||||
`FastFA` char(5) NOT NULL default '',
|
||||
`FastCode` char(6) NOT NULL default '',
|
||||
`Fastca` char(1) NOT NULL default '',
|
||||
`Fastmag` char(1) NOT NULL default '',
|
||||
`Beareratta` char(2) NOT NULL default '',
|
||||
PRIMARY KEY (`dardpo`,`dardtestard`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3');
|
||||
CREATE TABLE `t8_c` (
|
||||
`kattjame` varchar(32) NOT NULL default '',
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`realm_entered` varchar(32) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
|
||||
`kattjame_entered` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa` varchar(32) NOT NULL default '',
|
||||
`gest` varchar(16) default NULL,
|
||||
`hassetino` varchar(16) NOT NULL default '',
|
||||
`aaaproxysessfa` varchar(255) default NULL,
|
||||
`autologonallowed` char(1) default NULL,
|
||||
`squardporoot` varchar(15) NOT NULL default '',
|
||||
`naspo` varchar(15) default NULL,
|
||||
`beareratta` char(2) default NULL,
|
||||
`fastCode` varchar(6) default NULL,
|
||||
`fastFA` varchar(5) default NULL,
|
||||
`fastca` char(1) default NULL,
|
||||
`fastmag` char(1) default NULL,
|
||||
`lastupdate` datetime default NULL,
|
||||
`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`accthassetitime` int(10) unsigned default NULL,
|
||||
`acctoutputoctets` bigint(20) unsigned default NULL,
|
||||
`acctinputoctets` bigint(20) unsigned default NULL,
|
||||
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`),
|
||||
KEY `squardporoot` (`squardporoot`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565);
|
||||
CREATE TABLE `t9_c` (
|
||||
`kattjame` varchar(32) NOT NULL default '',
|
||||
`kattjame_entered` varchar(32) NOT NULL default '',
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`realm_entered` varchar(32) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
|
||||
`gest` varchar(16) default NULL,
|
||||
`hassetino` varchar(16) NOT NULL default '',
|
||||
`squardporoot` varchar(15) NOT NULL default '',
|
||||
`naspo` varchar(15) default NULL,
|
||||
`beareratta` char(2) default NULL,
|
||||
`fastCode` varchar(6) default NULL,
|
||||
`fastFA` varchar(5) default NULL,
|
||||
`fastca` char(1) default NULL,
|
||||
`fastmag` char(1) default NULL,
|
||||
`lastupdate` datetime default NULL,
|
||||
`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`accthassetitime` int(10) unsigned default NULL,
|
||||
`actcoutpuocttets` bigint(20) unsigned default NULL,
|
||||
`actinputocctets` bigint(20) unsigned default NULL,
|
||||
`terminateraste` tinyint(3) unsigned default NULL,
|
||||
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
|
||||
create table t1 engine=myisam as select * from t1_c;
|
||||
create table t2 engine=myisam as select * from t2_c;
|
||||
create table t3 engine=myisam as select * from t3_c;
|
||||
create table t4 engine=myisam as select * from t4_c;
|
||||
create table t5 engine=myisam as select * from t5_c;
|
||||
create table t6 engine=myisam as select * from t6_c;
|
||||
create table t7 engine=myisam as select * from t7_c;
|
||||
create table t8 engine=myisam as select * from t8_c;
|
||||
create table t9 engine=myisam as select * from t9_c;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
|
||||
DELETE FROM test.backup_info;
|
||||
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
|
||||
SELECT @the_backup_id:=backup_id FROM test.backup_info;
|
||||
@the_backup_id:=backup_id
|
||||
<the_backup_id>
|
||||
DROP TABLE test.backup_info;
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t1_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t2_c;
|
||||
count(*)
|
||||
6
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t3_c;
|
||||
count(*)
|
||||
4
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t4_c;
|
||||
count(*)
|
||||
22
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t5;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t5_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t6;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t6_c;
|
||||
count(*)
|
||||
8
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t7;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t7_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t8;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t8_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
count(*)
|
||||
3
|
||||
ALTER TABLE t1_c
|
||||
PARTITION BY RANGE (`capgoaledatta`)
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE);
|
||||
ALTER TABLE t2_c
|
||||
PARTITION BY LIST(`capgotod`)
|
||||
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6));
|
||||
ALTER TABLE t3_c
|
||||
PARTITION BY HASH (`CapGoaledatta`);
|
||||
ALTER TABLE t5_c
|
||||
PARTITION BY HASH (`capfa`)
|
||||
PARTITIONS 4;
|
||||
ALTER TABLE t6_c
|
||||
PARTITION BY LINEAR HASH (`relatta`)
|
||||
PARTITIONS 4;
|
||||
ALTER TABLE t7_c
|
||||
PARTITION BY LINEAR KEY (`dardtestard`);
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
|
||||
DELETE FROM test.backup_info;
|
||||
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
|
||||
SELECT @the_backup_id:=backup_id FROM test.backup_info;
|
||||
@the_backup_id:=backup_id
|
||||
<the_backup_id>
|
||||
DROP TABLE test.backup_info;
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t1_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t2_c;
|
||||
count(*)
|
||||
6
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t3_c;
|
||||
count(*)
|
||||
4
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t4_c;
|
||||
count(*)
|
||||
22
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t5;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t5_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t6;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t6_c;
|
||||
count(*)
|
||||
8
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t7;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t7_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t8;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t8_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
count(*)
|
||||
3
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t1_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t2_c;
|
||||
count(*)
|
||||
6
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
count(*)
|
||||
6
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t3_c;
|
||||
count(*)
|
||||
4
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
count(*)
|
||||
4
|
||||
select count(*) from t4;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t4_c;
|
||||
count(*)
|
||||
22
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
count(*)
|
||||
22
|
||||
select count(*) from t5;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t5_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t6;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t6_c;
|
||||
count(*)
|
||||
8
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
count(*)
|
||||
8
|
||||
select count(*) from t7;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t7_c;
|
||||
count(*)
|
||||
5
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
count(*)
|
||||
5
|
||||
select count(*) from t8;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t8_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9;
|
||||
count(*)
|
||||
3
|
||||
select count(*) from t9_c;
|
||||
count(*)
|
||||
3
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
count(*)
|
||||
3
|
||||
drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
|
||||
DELETE FROM test.backup_info;
|
||||
LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
|
||||
SELECT @the_backup_id:=backup_id FROM test.backup_info;
|
||||
@the_backup_id:=backup_id
|
||||
<the_backup_id>
|
||||
DROP TABLE test.backup_info;
|
||||
Create table test/def/t2_c failed: Translate frm error
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
drop table if exists t2_c;
|
||||
520093696,<the_backup_id>
|
@ -1,4 +1,38 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (a bigint)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values less than (10));
|
||||
ERROR 42000: VALUES value must be of same type as partition function near '),
|
||||
partition p1 values less than (10))' at line 3
|
||||
create table t1 (a bigint)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values in (10));
|
||||
ERROR 42000: VALUES value must be of same type as partition function near '),
|
||||
partition p1 values in (10))' at line 3
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (100),
|
||||
partition p1 values less than MAXVALUE);
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by hash (a);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFD);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFE);
|
||||
select * from t1 where (a + 1) < 10;
|
||||
a
|
||||
select * from t1 where (a + 1) > 10;
|
||||
a
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
engine = csv
|
||||
partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
ERROR HY000: CSV handler cannot be used in partitioned tables
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
(partition p0 engine = MEMORY);
|
||||
@ -12,13 +46,13 @@ show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (2) ENGINE = MyISAM)*/
|
||||
alter table t1 reorganize partition p1 into (partition p1 values less than (3));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY KEY (a) (PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (3) ENGINE = MyISAM)*/
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
@ -774,6 +808,18 @@ insert into t1 values (null);
|
||||
select * from t1 where f1 is null;
|
||||
f1
|
||||
NULL
|
||||
select * from t1 where f1 < 1;
|
||||
f1
|
||||
select * from t1 where f1 <= NULL;
|
||||
f1
|
||||
select * from t1 where f1 < NULL;
|
||||
f1
|
||||
select * from t1 where f1 >= NULL;
|
||||
f1
|
||||
select * from t1 where f1 > NULL;
|
||||
f1
|
||||
select * from t1 where f1 > 1;
|
||||
f1
|
||||
drop table t1;
|
||||
create table t1 (f1 smallint)
|
||||
partition by range (f1) (partition p0 values less than (0));
|
||||
@ -860,6 +906,16 @@ SHOW TABLE STATUS;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Dynamic 0 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
DROP TABLE t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0-1));
|
||||
ERROR HY000: Partition constant is out of partition function domain
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10));
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
ERROR HY000: Table has no partition for value 18446744073709551615
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by list (a)
|
||||
(partition `s1 s2` values in (0));
|
||||
|
@ -554,6 +554,10 @@ PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5));
|
||||
insert into t1 values (10);
|
||||
ERROR HY000: Table has no partition for value 10
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (-1));
|
||||
ERROR HY000: Partition constant is out of partition function domain
|
||||
create table t1 (v varchar(12))
|
||||
partition by range (ascii(v))
|
||||
(partition p0 values less than (10));
|
||||
|
@ -7,12 +7,6 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p1.MYD
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p1.MYI
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1.frm
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1.par
|
||||
ALTER TABLE t1 COALESCE PARTITION 1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
@ -20,7 +14,3 @@ t1 CREATE TABLE `t1` (
|
||||
`f_date` date DEFAULT NULL,
|
||||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p0.MYD
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1#P#p0.MYI
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1.frm
|
||||
/home/pappa/bug19305/mysql-test/var/master-data/test/t1.par
|
||||
|
@ -363,6 +363,33 @@ SELECT COUNT(*) FROM t1 WHERE c3 < '2000-12-31';
|
||||
COUNT(*)
|
||||
10
|
||||
DROP TABLE t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10),
|
||||
partition p1 values less than (0));
|
||||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM)
|
||||
drop table t1;
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (2),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (2) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM)
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
ERROR HY000: Table has no partition for value 18446744073709551615
|
||||
drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by range (MOD(a,3))
|
||||
subpartition by hash(a)
|
||||
|
@ -1,4 +1,4 @@
|
||||
set timestamp=1;
|
||||
SELECT sleep(1),NOW()-SYSDATE() as zero;
|
||||
sleep(1) zero
|
||||
0 0
|
||||
0 0.000000
|
||||
|
20
mysql-test/t/create_not_windows.test
Normal file
20
mysql-test/t/create_not_windows.test
Normal file
@ -0,0 +1,20 @@
|
||||
# Non-windows specific create tests.
|
||||
|
||||
--source include/not_windows.inc
|
||||
|
||||
#
|
||||
# Bug#19479:mysqldump creates invalid dump
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists `about:text`;
|
||||
--enable_warnings
|
||||
create table `about:text` (
|
||||
_id int not null auto_increment,
|
||||
`about:text` varchar(255) not null default '',
|
||||
primary key (_id)
|
||||
);
|
||||
|
||||
show create table `about:text`;
|
||||
drop table `about:text`;
|
||||
|
||||
# End of 5.0 tests
|
@ -367,6 +367,13 @@ select last_day('2005-01-00');
|
||||
select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
|
||||
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
|
||||
|
||||
#
|
||||
# Bug #16546
|
||||
#
|
||||
|
||||
select now() - now() + 0, curtime() - curtime() + 0,
|
||||
sec_to_time(1) + 0, from_unixtime(1) + 0;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
||||
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
|
||||
|
@ -580,28 +580,32 @@ connect (con2,localhost,user2,,mysqltest);
|
||||
connect (con3,localhost,user3,,mysqltest);
|
||||
connect (con4,localhost,user4,,);
|
||||
connection con1;
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
show grants;
|
||||
connection con2;
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
show grants;
|
||||
connection con3;
|
||||
select * from information_schema.column_privileges;
|
||||
select * from information_schema.table_privileges;
|
||||
select * from information_schema.schema_privileges;
|
||||
select * from information_schema.user_privileges;
|
||||
select * from information_schema.column_privileges order by grantee;
|
||||
select * from information_schema.table_privileges order by grantee;
|
||||
select * from information_schema.schema_privileges order by grantee;
|
||||
select * from information_schema.user_privileges order by grantee;
|
||||
show grants;
|
||||
connection con4;
|
||||
select * from information_schema.column_privileges where grantee like '%user%';
|
||||
select * from information_schema.table_privileges where grantee like '%user%';
|
||||
select * from information_schema.schema_privileges where grantee like '%user%';
|
||||
select * from information_schema.user_privileges where grantee like '%user%';
|
||||
select * from information_schema.column_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
select * from information_schema.table_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
select * from information_schema.schema_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
select * from information_schema.user_privileges where grantee like '%user%'
|
||||
order by grantee;
|
||||
show grants;
|
||||
connection default;
|
||||
drop user user1@localhost, user2@localhost, user3@localhost, user4@localhost;
|
||||
@ -824,25 +828,6 @@ select routine_name from information_schema.routines;
|
||||
delete from proc where name='';
|
||||
use test;
|
||||
|
||||
#
|
||||
# End of 5.0 tests.
|
||||
#
|
||||
# Show engines
|
||||
#
|
||||
|
||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||
|
||||
#
|
||||
# INFORMATION_SCHEMA.PROCESSLIST
|
||||
#
|
||||
|
||||
grant select on *.* to user3148@localhost;
|
||||
connect (con3148,localhost,user3148,,test);
|
||||
connection con3148;
|
||||
select user,db from information_schema.processlist;
|
||||
connection default;
|
||||
drop user user3148@localhost;
|
||||
|
||||
#
|
||||
# Bug#16681 information_schema shows forbidden VIEW details
|
||||
#
|
||||
@ -862,3 +847,31 @@ drop view v1, v2;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
|
||||
#
|
||||
# Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
|
||||
#
|
||||
set @a:= '.';
|
||||
create table t1(f1 char(5));
|
||||
create table t2(f1 char(5));
|
||||
select concat(@a, table_name), @a, table_name
|
||||
from information_schema.tables where table_schema = 'test';
|
||||
drop table t1,t2;
|
||||
|
||||
# End of 5.0 tests.
|
||||
#
|
||||
# Show engines
|
||||
#
|
||||
|
||||
select * from information_schema.engines WHERE ENGINE="MyISAM";
|
||||
|
||||
#
|
||||
# INFORMATION_SCHEMA.PROCESSLIST
|
||||
#
|
||||
|
||||
grant select on *.* to user3148@localhost;
|
||||
connect (con3148,localhost,user3148,,test);
|
||||
connection con3148;
|
||||
select user,db from information_schema.processlist;
|
||||
connection default;
|
||||
drop user user3148@localhost;
|
||||
|
||||
|
@ -128,6 +128,36 @@ unlock tables;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#16986 - Deadlock condition with MyISAM tables
|
||||
#
|
||||
connection locker;
|
||||
use mysql;
|
||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||
FLUSH TABLES;
|
||||
--sleep 1
|
||||
#
|
||||
connection reader;
|
||||
use mysql;
|
||||
#NOTE: This must be a multi-table select, otherwise the deadlock will not occur
|
||||
send SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||
--sleep 1
|
||||
#
|
||||
connection locker;
|
||||
# Make test case independent from earlier grants.
|
||||
--replace_result "Table is already up to date" "OK"
|
||||
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
connection reader;
|
||||
reap;
|
||||
use test;
|
||||
#
|
||||
connection locker;
|
||||
use test;
|
||||
#
|
||||
connection default;
|
||||
|
||||
# End of 5.0 tests
|
||||
# Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
|
||||
#
|
||||
connect (con1,localhost,root,,);
|
||||
@ -161,33 +191,3 @@ disconnect con2;
|
||||
--error ER_DB_DROP_EXISTS
|
||||
DROP DATABASE mysqltest_1;
|
||||
|
||||
# Bug#16986 - Deadlock condition with MyISAM tables
|
||||
#
|
||||
connection locker;
|
||||
use mysql;
|
||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||
FLUSH TABLES;
|
||||
--sleep 1
|
||||
#
|
||||
connection reader;
|
||||
use mysql;
|
||||
#NOTE: This must be a multi-table select, otherwise the deadlock will not occur
|
||||
send SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||
--sleep 1
|
||||
#
|
||||
connection locker;
|
||||
# Make test case independent from earlier grants.
|
||||
--replace_result "Table is already up to date" "OK"
|
||||
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
connection reader;
|
||||
reap;
|
||||
use test;
|
||||
#
|
||||
connection locker;
|
||||
use test;
|
||||
#
|
||||
connection default;
|
||||
|
||||
# End of 5.0 tests
|
||||
|
@ -139,3 +139,14 @@ select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1;
|
||||
drop table t2aA, t1Aa;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
|
||||
#
|
||||
create database mysqltest_LC2;
|
||||
use mysqltest_LC2;
|
||||
create table myUC (i int);
|
||||
select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES
|
||||
where TABLE_SCHEMA ='mysqltest_LC2';
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
|
@ -367,12 +367,23 @@ CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR(
|
||||
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||
--enable_warnings
|
||||
|
||||
# Ndb doesn't support renaming attributes on-line
|
||||
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||
truncate ndb_show_tables;
|
||||
|
||||
alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
|
||||
--disable_warnings
|
||||
--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat
|
||||
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||
--enable_warnings
|
||||
|
||||
select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
|
||||
|
||||
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||
truncate ndb_show_tables;
|
||||
|
||||
create index i1 on t1(medium);
|
||||
alter table t1 add index i2(long_int);
|
||||
alter table t1 add index i2(new_tiny);
|
||||
drop index i1 on t1;
|
||||
|
||||
--disable_warnings
|
||||
|
70
mysql-test/t/ndb_loaddatalocal.test
Normal file
70
mysql-test/t/ndb_loaddatalocal.test
Normal file
@ -0,0 +1,70 @@
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int) engine=myisam;
|
||||
let $1=10000;
|
||||
disable_query_log;
|
||||
set SQL_LOG_BIN=0;
|
||||
while ($1)
|
||||
{
|
||||
insert into t1 values(1);
|
||||
dec $1;
|
||||
}
|
||||
set SQL_LOG_BIN=1;
|
||||
enable_query_log;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
#This will generate a 20KB file, now test LOAD DATA LOCAL
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int) engine=ndb;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
select count(*) from t1;
|
||||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile ;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (2), (2), (3);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile;
|
||||
select * from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (1), (2), (3);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile;
|
||||
select * from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int) engine=myisam;
|
||||
insert into t1 values (1), (2), (3), (3);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1(a int primary key) engine=ndb;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile' into table t1;
|
||||
system rm $MYSQLTEST_VARDIR/master-data/ndb_loaddatalocal.select_outfile;
|
||||
select * from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
1
mysql-test/t/ndb_restore_partition-master.opt
Normal file
1
mysql-test/t/ndb_restore_partition-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--new
|
375
mysql-test/t/ndb_restore_partition.test
Normal file
375
mysql-test/t/ndb_restore_partition.test
Normal file
@ -0,0 +1,375 @@
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/ndb_default_cluster.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_warnings
|
||||
use test;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
drop table if exists t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE `t1_c` (
|
||||
`capgoaledatta` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`goaledatta` char(2) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (`capgoaledatta`,`goaledatta`,`maturegarbagefa`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1_c` VALUES (2,'3','q3plus.qt'),(4,'4','q3plus.qt'),(1,'3','q3.net'),(3,'4','q3.net'),(3,'20','threetrees.qt');
|
||||
|
||||
CREATE TABLE `t2_c` (
|
||||
`capgotod` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`gotod` smallint(5) unsigned NOT NULL default '0',
|
||||
`goaledatta` char(2) default NULL,
|
||||
`maturegarbagefa` varchar(32) default NULL,
|
||||
`descrpooppo` varchar(64) default NULL,
|
||||
`svcutonsa` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`capgotod`),
|
||||
KEY `i_quadaddsvr` (`gotod`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t2_c` VALUES (5,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST');
|
||||
|
||||
CREATE TABLE `t3_c` (
|
||||
`CapGoaledatta` smallint(5) unsigned NOT NULL default '0',
|
||||
`capgotod` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`capgotod`,`CapGoaledatta`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t3_c` VALUES (5,3),(2,4),(5,4),(1,3);
|
||||
|
||||
CREATE TABLE `t4_c` (
|
||||
`capfa` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`authpwchap` varchar(32) default NULL,
|
||||
`fa` varchar(32) NOT NULL default '',
|
||||
`payyingatta` tinyint(4) NOT NULL default '0',
|
||||
`status` char(1) default NULL,
|
||||
PRIMARY KEY (`fa`,`realm`),
|
||||
KEY `capfa` (`capfa`),
|
||||
KEY `i_quadentity` (`fa`,`realm`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t4_c` VALUES (18,'john.smith','q3.net','dessjohn.smith',0,NULL),(21,'quad_katt_with_brandtad','q3.net','acne',0,NULL),(22,'quad_katt_carattoaa','q3.net','acne',0,NULL),(26,'436462612809','sqasdt.q3.net','N/A',0,'6'),(19,'john','smith.qt','dessjohn',0,NULL),(33,'436643196120','sqasdt.q3.net','N/A',1,'6'),(28,'436642900019','sqasdt.q3.net','N/A',0,'6'),(30,'436462900209','sqasdt.q3.net','N/A',0,'6'),(16,'436640006666','sqasdt.q3.net','',0,NULL),(19,'dette','el-redun.com','dessdette',0,NULL),(12,'quad_kattPP','q3.net','acne',2,NULL),(14,'436640008888','sqasdt.q3.net','',0,NULL),(29,'463624900028','sqasdt.q3.net','N/A',0,'6'),(15,'436640099099','sqasdt.q3.net','',0,NULL),(13,'pap','q3plus.qt','acne',1,NULL),(19,'436642612091','sqasdt.q3.net','N/A',0,'6'),(12,'quad_katt','q3.net','acne',0,NULL),(11,'quad_kattVK','q3.net','acne',1,NULL),(32,'463641969502','sqasdt.q3.net','N/A',1,'6'),(20,'joe','q3.net','joedesswd',0,NULL),(29,'436642900034','sqasdt.q3.net','N/A',0,'6'),(25,'contind','armerde.qt','acne',1,NULL);
|
||||
|
||||
CREATE TABLE `t5_c` (
|
||||
`capfa` bigint(20) unsigned NOT NULL default '0',
|
||||
`gotod` smallint(5) unsigned NOT NULL default '0',
|
||||
`orderutonsa` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`capfa`,`gotod`,`orderutonsa`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t5_c` VALUES (21,2,''),(21,1,''),(22,4,'');
|
||||
|
||||
CREATE TABLE `t6_c` (
|
||||
`capfa_parent` bigint(20) unsigned NOT NULL default '0',
|
||||
`capfa_child` bigint(20) unsigned NOT NULL default '0',
|
||||
`relatta` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`capfa_child`,`capfa_parent`,`relatta`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t6_c` VALUES (15,16,0),(19,20,0),(18326932092909551615,30,0),(26,29,0),(18326932092909551615,29,0),(19,18,0),(26,28,0),(12,14,0);
|
||||
|
||||
CREATE TABLE `t7_c` (
|
||||
`dardpo` char(15) NOT NULL default '',
|
||||
`dardtestard` tinyint(3) unsigned NOT NULL default '0',
|
||||
`FastFA` char(5) NOT NULL default '',
|
||||
`FastCode` char(6) NOT NULL default '',
|
||||
`Fastca` char(1) NOT NULL default '',
|
||||
`Fastmag` char(1) NOT NULL default '',
|
||||
`Beareratta` char(2) NOT NULL default '',
|
||||
PRIMARY KEY (`dardpo`,`dardtestard`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t7_c` VALUES ('2.6.2.4',24,'CECHP','54545','0','0','5'),('2.2.5.4',26,'CANFA','33223','1','1','4'),('4.3.2.4',28,'ITALD','54222','1','0','5'),('129..0.0.eins',28,'G','99999','1','1','5'),('1.1.1.1',24,'AUTPT','32323','0','1','3');
|
||||
|
||||
CREATE TABLE `t8_c` (
|
||||
`kattjame` varchar(32) NOT NULL default '',
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`realm_entered` varchar(32) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
|
||||
`kattjame_entered` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa` varchar(32) NOT NULL default '',
|
||||
`gest` varchar(16) default NULL,
|
||||
`hassetino` varchar(16) NOT NULL default '',
|
||||
`aaaproxysessfa` varchar(255) default NULL,
|
||||
`autologonallowed` char(1) default NULL,
|
||||
`squardporoot` varchar(15) NOT NULL default '',
|
||||
`naspo` varchar(15) default NULL,
|
||||
`beareratta` char(2) default NULL,
|
||||
`fastCode` varchar(6) default NULL,
|
||||
`fastFA` varchar(5) default NULL,
|
||||
`fastca` char(1) default NULL,
|
||||
`fastmag` char(1) default NULL,
|
||||
`lastupdate` datetime default NULL,
|
||||
`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`accthassetitime` int(10) unsigned default NULL,
|
||||
`acctoutputoctets` bigint(20) unsigned default NULL,
|
||||
`acctinputoctets` bigint(20) unsigned default NULL,
|
||||
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`),
|
||||
KEY `squardporoot` (`squardporoot`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t8_c` VALUES ('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643196120','436643196929','8956234534568968','5524595699','uxasmt21.net.acne.qt/481889229462692422','','1.1.1.1','2.2.4.6','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565),('4545435545','john','q3.net','q3.net','acne.li','436643196120','436643196929','45345234568968','995696699','uxasmt21.net.acne.qt/481889229462692423','','1.1.1.1','2.2.9.8','2','86989','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8821923,169,3565),('versteckter_q3net_katt','joe','q3.net','elredun.com','q3.net','436643196120','436643196939','91341234568968','695595699','uxasmt21.net.acne.qt/481889229462692421','','1.1.1.1','2.5.2.5','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',1923123,9569,6565);
|
||||
|
||||
CREATE TABLE `t9_c` (
|
||||
`kattjame` varchar(32) NOT NULL default '',
|
||||
`kattjame_entered` varchar(32) NOT NULL default '',
|
||||
`realm` varchar(32) NOT NULL default '',
|
||||
`realm_entered` varchar(32) NOT NULL default '',
|
||||
`maturegarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa` varchar(32) NOT NULL default '',
|
||||
`hunderaaarbagefa_parent` varchar(32) NOT NULL default '',
|
||||
`gest` varchar(16) default NULL,
|
||||
`hassetino` varchar(16) NOT NULL default '',
|
||||
`squardporoot` varchar(15) NOT NULL default '',
|
||||
`naspo` varchar(15) default NULL,
|
||||
`beareratta` char(2) default NULL,
|
||||
`fastCode` varchar(6) default NULL,
|
||||
`fastFA` varchar(5) default NULL,
|
||||
`fastca` char(1) default NULL,
|
||||
`fastmag` char(1) default NULL,
|
||||
`lastupdate` datetime default NULL,
|
||||
`hassetistart` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`accthassetitime` int(10) unsigned default NULL,
|
||||
`actcoutpuocttets` bigint(20) unsigned default NULL,
|
||||
`actinputocctets` bigint(20) unsigned default NULL,
|
||||
`terminateraste` tinyint(3) unsigned default NULL,
|
||||
PRIMARY KEY (`kattjame`,`hunderaaarbagefa`,`hassetistart`,`hassetino`)
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net','436643316120','436643316939','91341234568968','695595699','1.1.1.1','2.2.6.2','3','86989','34','x','x','2012-03-12 18:35:04','2012-12-05 12:35:04',3123123,9569,6565,1),('4tt45345235','pap','q3plus.qt','q3plus.qt','q3.net','436643316120','436643316939','8956234534568968','5254595969','1.1.1.1','8.6.2.2','4','86989','34','x','x','2012-03-12 12:55:34','2012-12-05 11:20:04',3223433,3369,9565,2),('4545435545','john','q3.net','q3.net','acne.li','436643316120','436643316939','45345234568968','995696699','1.1.1.1','2.9.9.2','2','86998','34','x','x','2012-03-12 11:35:03','2012-12-05 08:50:04',8823123,169,3565,3);
|
||||
|
||||
create table t1 engine=myisam as select * from t1_c;
|
||||
create table t2 engine=myisam as select * from t2_c;
|
||||
create table t3 engine=myisam as select * from t3_c;
|
||||
create table t4 engine=myisam as select * from t4_c;
|
||||
create table t5 engine=myisam as select * from t5_c;
|
||||
create table t6 engine=myisam as select * from t6_c;
|
||||
create table t7 engine=myisam as select * from t7_c;
|
||||
create table t8 engine=myisam as select * from t8_c;
|
||||
create table t9 engine=myisam as select * from t9_c;
|
||||
|
||||
|
||||
--source include/ndb_backup.inc
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
# random output order??
|
||||
#show tables;
|
||||
|
||||
select count(*) from t1;
|
||||
select count(*) from t1_c;
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
|
||||
select count(*) from t2;
|
||||
select count(*) from t2_c;
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
|
||||
select count(*) from t3;
|
||||
select count(*) from t3_c;
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
|
||||
select count(*) from t4;
|
||||
select count(*) from t4_c;
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
|
||||
select count(*) from t5;
|
||||
select count(*) from t5_c;
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
|
||||
select count(*) from t6;
|
||||
select count(*) from t6_c;
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
|
||||
select count(*) from t7;
|
||||
select count(*) from t7_c;
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
|
||||
select count(*) from t8;
|
||||
select count(*) from t8_c;
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
|
||||
select count(*) from t9;
|
||||
select count(*) from t9_c;
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
|
||||
#
|
||||
# Try Partitioned tables as well
|
||||
#
|
||||
ALTER TABLE t1_c
|
||||
PARTITION BY RANGE (`capgoaledatta`)
|
||||
(PARTITION p0 VALUES LESS THAN MAXVALUE);
|
||||
|
||||
ALTER TABLE t2_c
|
||||
PARTITION BY LIST(`capgotod`)
|
||||
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6));
|
||||
|
||||
ALTER TABLE t3_c
|
||||
PARTITION BY HASH (`CapGoaledatta`);
|
||||
|
||||
ALTER TABLE t5_c
|
||||
PARTITION BY HASH (`capfa`)
|
||||
PARTITIONS 4;
|
||||
|
||||
ALTER TABLE t6_c
|
||||
PARTITION BY LINEAR HASH (`relatta`)
|
||||
PARTITIONS 4;
|
||||
|
||||
ALTER TABLE t7_c
|
||||
PARTITION BY LINEAR KEY (`dardtestard`);
|
||||
|
||||
--source include/ndb_backup.inc
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
select count(*) from t1;
|
||||
select count(*) from t1_c;
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
|
||||
select count(*) from t2;
|
||||
select count(*) from t2_c;
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
|
||||
select count(*) from t3;
|
||||
select count(*) from t3_c;
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
|
||||
select count(*) from t4;
|
||||
select count(*) from t4_c;
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
|
||||
select count(*) from t5;
|
||||
select count(*) from t5_c;
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
|
||||
select count(*) from t6;
|
||||
select count(*) from t6_c;
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
|
||||
select count(*) from t7;
|
||||
select count(*) from t7_c;
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
|
||||
select count(*) from t8;
|
||||
select count(*) from t8_c;
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
|
||||
select count(*) from t9;
|
||||
select count(*) from t9_c;
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
|
||||
drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,0)' --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
|
||||
|
||||
select count(*) from t1;
|
||||
select count(*) from t1_c;
|
||||
select count(*)
|
||||
from (select * from t1 union
|
||||
select * from t1_c) a;
|
||||
|
||||
select count(*) from t2;
|
||||
select count(*) from t2_c;
|
||||
select count(*)
|
||||
from (select * from t2 union
|
||||
select * from t2_c) a;
|
||||
|
||||
select count(*) from t3;
|
||||
select count(*) from t3_c;
|
||||
select count(*)
|
||||
from (select * from t3 union
|
||||
select * from t3_c) a;
|
||||
|
||||
select count(*) from t4;
|
||||
select count(*) from t4_c;
|
||||
select count(*)
|
||||
from (select * from t4 union
|
||||
select * from t4_c) a;
|
||||
|
||||
select count(*) from t5;
|
||||
select count(*) from t5_c;
|
||||
select count(*)
|
||||
from (select * from t5 union
|
||||
select * from t5_c) a;
|
||||
|
||||
select count(*) from t6;
|
||||
select count(*) from t6_c;
|
||||
select count(*)
|
||||
from (select * from t6 union
|
||||
select * from t6_c) a;
|
||||
|
||||
select count(*) from t7;
|
||||
select count(*) from t7_c;
|
||||
select count(*)
|
||||
from (select * from t7 union
|
||||
select * from t7_c) a;
|
||||
|
||||
select count(*) from t8;
|
||||
select count(*) from t8_c;
|
||||
select count(*)
|
||||
from (select * from t8 union
|
||||
select * from t8_c) a;
|
||||
|
||||
select count(*) from t9;
|
||||
select count(*) from t9_c;
|
||||
select count(*)
|
||||
from (select * from t9 union
|
||||
select * from t9_c) a;
|
||||
|
||||
#
|
||||
# Drop all table except t2_c
|
||||
# This to make sure that error returned from ndb_restore above is
|
||||
# guaranteed to be from t2_c, this since order of tables in backup
|
||||
# is none deterministic
|
||||
#
|
||||
drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c;
|
||||
--source include/ndb_backup.inc
|
||||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --core=0 -b $the_backup_id -n 1 -m -r --ndb-nodegroup_map '(0,1)' $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id 2>&1 | grep Translate || true
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
drop table if exists t2_c;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Test BUG#10287
|
||||
#
|
||||
|
||||
--exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults -d sys -D , SYSTAB_0 | grep 520093696, | sed "s/,$the_backup_id/,<the_backup_id>/"
|
||||
|
||||
# End of 4.1 tests
|
@ -9,6 +9,47 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# BUG 16002: Handle unsigned integer functions properly
|
||||
#
|
||||
--error 1064
|
||||
create table t1 (a bigint)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values less than (10));
|
||||
--error 1064
|
||||
create table t1 (a bigint)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0xFFFFFFFFFFFFFFFF),
|
||||
partition p1 values in (10));
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (100),
|
||||
partition p1 values less than MAXVALUE);
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by hash (a);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFD);
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFE);
|
||||
select * from t1 where (a + 1) < 10;
|
||||
select * from t1 where (a + 1) > 10;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 19307: CSV engine crashes
|
||||
#
|
||||
--error ER_PARTITION_MERGE_ERROR
|
||||
create table t1 (a int)
|
||||
engine = csv
|
||||
partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
|
||||
#
|
||||
# Added test case
|
||||
#
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
(partition p0 engine = MEMORY);
|
||||
@ -908,6 +949,12 @@ create table t1 (f1 smallint)
|
||||
partition by list (f1) (partition p0 values in (null));
|
||||
insert into t1 values (null);
|
||||
select * from t1 where f1 is null;
|
||||
select * from t1 where f1 < 1;
|
||||
select * from t1 where f1 <= NULL;
|
||||
select * from t1 where f1 < NULL;
|
||||
select * from t1 where f1 >= NULL;
|
||||
select * from t1 where f1 > NULL;
|
||||
select * from t1 where f1 > 1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (f1 smallint)
|
||||
@ -974,6 +1021,23 @@ PARTITION p2 VALUES LESS THAN (30) ENGINE = MyISAM);
|
||||
SHOW TABLE STATUS;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
#BUG 16002 Erroneus handling of unsigned partition functions
|
||||
#
|
||||
--error ER_PARTITION_CONST_DOMAIN_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by list (a)
|
||||
(partition p0 values in (0-1));
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10));
|
||||
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
#BUG 18750 Problems with partition names
|
||||
#
|
||||
|
@ -748,6 +748,10 @@ CREATE TABLE t1(a int)
|
||||
insert into t1 values (10);
|
||||
drop table t1;
|
||||
|
||||
--error ER_PARTITION_CONST_DOMAIN_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (-1));
|
||||
#
|
||||
# Bug 18198 Partitions: Verify that erroneus partition functions doesn't work
|
||||
#
|
||||
|
@ -5,10 +5,10 @@ CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30))
|
||||
PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
||||
#--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
||||
ALTER TABLE t1 COALESCE PARTITION 1;
|
||||
SHOW CREATE TABLE t1;
|
||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
||||
#--exec ls $MYSQLTEST_VARDIR/master-data/test/t1*
|
||||
|
||||
|
||||
|
||||
|
@ -388,6 +388,31 @@ SELECT COUNT(*) FROM t1 WHERE c3 BETWEEN '1996-12-31' AND '2000-12-31';
|
||||
SELECT COUNT(*) FROM t1 WHERE c3 < '2000-12-31';
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG 16002: Unsigned partition functions not handled correctly
|
||||
#
|
||||
--error ER_RANGE_NOT_INCREASING_ERROR
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (10),
|
||||
partition p1 values less than (0));
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bigint unsigned)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (2),
|
||||
partition p1 values less than (10));
|
||||
show create table t1;
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
insert into t1 values (0xFFFFFFFFFFFFFFFF);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG 18962 Errors in DROP PARTITION
|
||||
#
|
||||
|
Reference in New Issue
Block a user