[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.138.178.162: ~ $
drop table if exists t1;
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b),
index (a))
engine = ndb
partition by range (a)
partitions 3
(partition x1 values less than (5),
partition x2 values less than (10),
partition x3 values less than (20));
INSERT into t1 values (1, 1, 1);
INSERT into t1 values (6, 1, 1);
INSERT into t1 values (10, 1, 1);
INSERT into t1 values (15, 1, 1);
select * from information_schema.partitions where table_name= 't1';
TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PARTITION_NAME	SUBPARTITION_NAME	PARTITION_ORDINAL_POSITION	SUBPARTITION_ORDINAL_POSITION	PARTITION_METHOD	SUBPARTITION_METHOD	PARTITION_EXPRESSION	SUBPARTITION_EXPRESSION	PARTITION_DESCRIPTION	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH	MAX_DATA_LENGTH	INDEX_LENGTH	DATA_FREE	CREATE_TIME	UPDATE_TIME	CHECK_TIME	CHECKSUM	PARTITION_COMMENT	NODEGROUP	TABLESPACE_NAME
def	test	t1	x1	NULL	1	NULL	RANGE	NULL	a	NULL	5	1	40	32768	#	0	0	#	#	NULL	NULL		default	NULL
def	test	t1	x2	NULL	2	NULL	RANGE	NULL	a	NULL	10	1	40	32768	#	0	0	#	#	NULL	NULL		default	NULL
def	test	t1	x3	NULL	3	NULL	RANGE	NULL	a	NULL	20	2	40	32768	#	0	0	#	#	NULL	NULL		default	NULL
select * from t1 order by a;
a	b	c
1	1	1
6	1	1
10	1	1
15	1	1
select * from t1 where a=1 order by a;
a	b	c
1	1	1
select * from t1 where a=15 and b=1 order by a;
a	b	c
15	1	1
select * from t1 where a=21 and b=1 order by a;
a	b	c
select * from t1 where a=21 order by a;
a	b	c
select * from t1 where a in (1,6,10,21) order by a;
a	b	c
1	1	1
6	1	1
10	1	1
select * from t1 where b=1 and a in (1,6,10,21) order by a;
a	b	c
1	1	1
6	1	1
10	1	1
INSERT into t1 values (1, 2, 2);
select max(b) from t1 where a = 1;
max(b)
2
select b from t1 where a = 1 order by b desc;
b
2
1
drop table t1;
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(b),
unique (a))
engine = ndb
partition by range (b)
partitions 3
(partition x1 values less than (5),
partition x2 values less than (10),
partition x3 values less than (20));
INSERT into t1 values (1, 1, 1);
INSERT into t1 values (2, 6, 1);
INSERT into t1 values (3, 10, 1);
INSERT into t1 values (4, 15, 1);
select * from t1 order by a;
a	b	c
1	1	1
2	6	1
3	10	1
4	15	1
UPDATE t1 set a = 5 WHERE b = 15;
select * from t1 order by a;
a	b	c
1	1	1
2	6	1
3	10	1
5	15	1
UPDATE t1 set a = 6 WHERE a = 5;
select * from t1 order by a;
a	b	c
1	1	1
2	6	1
3	10	1
6	15	1
select * from t1 where b=1 order by b;
a	b	c
1	1	1
select * from t1 where b=15 and a=1 order by b;
a	b	c
select * from t1 where b=21 and a=1 order by b;
a	b	c
select * from t1 where b=21 order by b;
a	b	c
select * from t1 where b in (1,6,10,21) order by b;
a	b	c
1	1	1
2	6	1
3	10	1
select * from t1 where a in (1,2,5,6) order by b;
a	b	c
1	1	1
2	6	1
6	15	1
select * from t1 where a=1 and b in (1,6,10,21) order by b;
a	b	c
1	1	1
select * from t1 where b=6;
a	b	c
2	6	1
DELETE from t1 WHERE b = 6;
select * from t1 where b=6;
a	b	c
select * from t1 where a=6;
a	b	c
6	15	1
UPDATE t1 SET c=1001 WHERE a=6;
select * from t1 where a=6;
a	b	c
6	15	1001
DELETE from t1 WHERE a = 6;
select * from t1 where a=6;
a	b	c
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a` int(11) NOT NULL,
  `b` int(11) NOT NULL,
  `c` int(11) NOT NULL,
  PRIMARY KEY (`b`),
  UNIQUE KEY `a` (`a`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (b)
(PARTITION x1 VALUES LESS THAN (5) ENGINE = ndbcluster,
 PARTITION x2 VALUES LESS THAN (10) ENGINE = ndbcluster,
 PARTITION x3 VALUES LESS THAN (20) ENGINE = ndbcluster) */
drop table t1;
CREATE TABLE t1
(id MEDIUMINT NOT NULL,
b1 BIT(8),
vc VARCHAR(255),
bc CHAR(255),
d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0,
total BIGINT UNSIGNED,
y YEAR,
t DATE PRIMARY KEY) ENGINE=NDB
PARTITION BY RANGE (YEAR(t))
(PARTITION p0 VALUES LESS THAN (1901),
PARTITION p1 VALUES LESS THAN (1946),
PARTITION p2 VALUES LESS THAN (1966),
PARTITION p3 VALUES LESS THAN (1986),
PARTITION p4 VALUES LESS THAN (2005),
PARTITION p5 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (0,NULL,NULL,NULL,NULL,NULL,NULL,NULL, '2009-05-15');
SELECT * FROM t1;
id	b1	vc	bc	d	f	total	y	t
0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	2009-05-15
ALTER TABLE t1 ENGINE=MYISAM;
SELECT * FROM t1;
id	b1	vc	bc	d	f	total	y	t
0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	2009-05-15
DROP TABLE t1;
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
  INITIAL_SIZE 16M
UNDO_BUFFER_SIZE=1M
ENGINE=NDB;
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
  USE LOGFILE GROUP lg1
INITIAL_SIZE 12M
EXTENT_SIZE 256k
ENGINE NDB;
CREATE TABLE test.t1 (
a1 INT,
a2 TEXT NOT NULL,
a3 BIT NOT NULL,
a4 DECIMAL(8,3),
a5 INT NOT NULL,
a6 INT,
PRIMARY KEY(a1))
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
PARTITION BY LIST (a1)
(PARTITION p0 VALUES IN (1,2,3,4,5),
PARTITION p1 VALUES IN (6,7,8,9, 10),
PARTITION p2 VALUES IN (11, 12, 13, 14, 15));
ALTER TABLE test.t1 DROP COLUMN a6;
ALTER TABLE test.t1 ADD COLUMN a6 VARCHAR(255);
SELECT COUNT(*) FROM test.t1;
COUNT(*)
15
ALTER TABLE test.t1 DROP COLUMN a4;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
15
DROP TABLE t1;
CREATE TABLE test.t1 (
a1 INT,
a2 TEXT NOT NULL,
a3 BIT NOT NULL,
a4 DECIMAL(8,3),
a5 INT NOT NULL,
a6 VARCHAR(255),
PRIMARY KEY(a1))
TABLESPACE ts1 STORAGE DISK ENGINE=NDB
PARTITION BY HASH(a1)
PARTITIONS 4;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
15
ALTER TABLE test.t1 DROP COLUMN a4;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
15
DROP TABLE t1;
ALTER TABLESPACE ts1 
DROP DATAFILE 'datafile.dat' 
ENGINE=NDB;
DROP TABLESPACE ts1 ENGINE=NDB;
DROP LOGFILE GROUP lg1 ENGINE=NDB;
CREATE TABLE t1
(id MEDIUMINT NOT NULL PRIMARY KEY,
b1 BIT(8),
vc VARCHAR(255),
bc CHAR(255),
d DECIMAL(10,4) DEFAULT 0,
f FLOAT DEFAULT 0,
total BIGINT UNSIGNED,
y YEAR,
t DATE) ENGINE=NDB
PARTITION BY LIST(id)
(PARTITION p0 VALUES IN (2, 4),
PARTITION p1 VALUES IN (42, 142));
INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
SELECT * FROM t1;
id	b1	vc	bc	d	f	total	y	t
2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
ALTER TABLE t1 ADD PARTITION
(PARTITION p2 VALUES IN (412));
SELECT * FROM t1;
id	b1	vc	bc	d	f	total	y	t
2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
DROP TABLE t1;
CREATE TABLE t1 (
a int not null PRIMARY KEY,
b int not null,
c int not null)
partition by list(a)
partitions 2
(partition x123 values in (1,5,6),
partition x234 values in (4,7,8));
INSERT into t1 VALUES (5,1,1);
select * from t1;
a	b	c
5	1	1
UPDATE t1 SET a=8 WHERE a=5 AND b=1;
select * from t1;
a	b	c
8	1	1
drop table t1;
CREATE TABLE t1 ( f1 INTEGER PRIMARY KEY, f2 char(20)) engine=ndb
PARTITION BY RANGE(f1)
( PARTITION part1 VALUES LESS THAN (2),
PARTITION part2 VALUES LESS THAN (1000));
INSERT INTO t1 VALUES(1, '---1---');
INSERT INTO t1 VALUES(2, '---2---');
select * from t1 order by f1;
f1	f2
1	---1---
2	---2---
UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 2;
select * from t1 order by f1;
f1	f2
1	---1---
6	---2---
UPDATE t1 SET f1 = f1 + 4 WHERE f1 = 1;
select * from t1 order by f1;
f1	f2
5	---1---
6	---2---
drop table t1;
create table t1 ( a int, b int, c int, primary key (a,b)) engine=ndb 
partition by range (a)
(partition part0 values less than (3),
partition part1 values less than (6));
insert into t1 values (0, 0, 0);
insert into t1 values (0, 1, 1);
insert into t1 values (0, 2, 2);
insert into t1 values (1, 0, 3);
insert into t1 values (1, 1, 4);
insert into t1 values (1, 2, 5);
insert into t1 values (4, 0, 6);
insert into t1 values (4, 1, 7);
insert into t1 values (4, 2, 8);
All partitions scan
select * from t1 order by c;
a	b	c
0	0	0
0	1	1
0	2	2
1	0	3
1	1	4
1	2	5
4	0	6
4	1	7
4	2	8
ndb_scan_count
1
ndb_pruned_scan_count
0
Single partition scan
select * from t1 where a=0 order by c;
a	b	c
0	0	0
0	1	1
0	2	2
ndb_scan_count
1
ndb_pruned_scan_count
1
Single partition scan
select * from t1 where a=4 order by c;
a	b	c
4	0	6
4	1	7
4	2	8
ndb_scan_count
1
ndb_pruned_scan_count
1
Single partition scan
select * from t1 where a<3 order by c;
a	b	c
0	0	0
0	1	1
0	2	2
1	0	3
1	1	4
1	2	5
ndb_scan_count
1
ndb_pruned_scan_count
1
MRR single partition scan
select * from t1 where a in (0, 2) order by c;
a	b	c
0	0	0
0	1	1
0	2	2
ndb_scan_count
1
ndb_pruned_scan_count
1
drop table t1;

Filemanager

Name Type Size Permission Actions
bug36547.result File 455 B 0644
loaddata_autocom_ndb.result File 726 B 0644
ndb_add_partition.result File 5.91 KB 0644
ndb_alter_table.result File 10.88 KB 0644
ndb_alter_table2.result File 685 B 0644
ndb_alter_table3.result File 1.48 KB 0644
ndb_alter_table_backup.result File 1.76 KB 0644
ndb_alter_table_error.result File 648 B 0644
ndb_alter_table_online.result File 26.79 KB 0644
ndb_alter_table_online2.result File 2.62 KB 0644
ndb_alter_table_online_multi.result File 1.98 KB 0644
ndb_auto_increment.result File 9.99 KB 0644
ndb_autoinc.result File 793 B 0644
ndb_basic.result File 29.94 KB 0644
ndb_bitfield.result File 8.26 KB 0644
ndb_blob.result File 22.71 KB 0644
ndb_blob_big.result File 1.24 KB 0644
ndb_blob_partition.result File 9.03 KB 0644
ndb_bug26793.result File 257 B 0644
ndb_bug31477.result File 1.85 KB 0644
ndb_bug31754.result File 262 B 0644
ndb_bulk_delete.result File 1.87 KB 0644
ndb_cache.result File 8.68 KB 0644
ndb_cache2.result File 13.31 KB 0644
ndb_cache_multi.result File 1.67 KB 0644
ndb_cache_multi2.result File 1.68 KB 0644
ndb_cache_trans.result File 6.65 KB 0644
ndb_charset.result File 5.77 KB 0644
ndb_column_properties.result File 15.98 KB 0644
ndb_condition_pushdown.result File 72.29 KB 0644
ndb_config.result File 3.21 KB 0644
ndb_config2.result File 475 B 0644
ndb_create_table.result File 1.02 KB 0644
ndb_cursor.result File 865 B 0644
ndb_database.result File 1.23 KB 0644
ndb_dbug_lock.result File 1.64 KB 0644
ndb_dbug_tc_select.result File 5.98 KB 0644
ndb_dd_alter.result File 27.07 KB 0644
ndb_dd_basic.result File 20.67 KB 0644
ndb_dd_bug12581213.result File 334 B 0644
ndb_dd_ddl.result File 5.56 KB 0644
ndb_dd_disk2memory.result File 12.99 KB 0644
ndb_dd_dump.result File 15.97 KB 0644
ndb_dd_restore_compat.result File 3.61 KB 0644
ndb_dd_sql_features.result File 22.4 KB 0644
ndb_ddl_open_trans.result File 1.36 KB 0644
ndb_disconnect_ddl.result File 281 B 0644
ndb_discover_db.result File 1.55 KB 0644
ndb_dist_priv.result File 4.8 KB 0644
ndb_gis.result File 47.18 KB 0644
ndb_global_schema_lock.result File 3.43 KB 0644
ndb_global_schema_lock_error.result File 1.94 KB 0644
ndb_grant.result File 17.65 KB 0644
ndb_hidden_pk.result File 10.55 KB 0644
ndb_index.result File 13.93 KB 0644
ndb_index_ordered.result File 16.71 KB 0644
ndb_index_stat.result File 14.33 KB 0644
ndb_index_unique.result File 17.43 KB 0644
ndb_insert.result File 36.2 KB 0644
ndb_join_pushdown.result File 274.88 KB 0644
ndb_limit.result File 2.01 KB 0644
ndb_load.result File 2.64 KB 0644
ndb_loaddatalocal.result File 1.39 KB 0644
ndb_lock.result File 4.17 KB 0644
ndb_lock_table.result File 205 B 0644
ndb_mgm.result File 3.55 KB 0644
ndb_minmax.result File 1.47 KB 0644
ndb_multi.result File 3.7 KB 0644
ndb_multi_row.result File 1.33 KB 0644
ndb_native_default_support.result File 47.23 KB 0644
ndb_optimize_table.result File 2 KB 0644
ndb_optimized_node_selection.result File 1017 B 0644
ndb_partition_error.result File 1.41 KB 0644
ndb_partition_error2.result File 150 B 0644
ndb_partition_hash.result File 890 B 0644
ndb_partition_key.result File 8.16 KB 0644
ndb_partition_list.result File 2.31 KB 0644
ndb_partition_range.result File 7.91 KB 0644
ndb_read_multi_range.result File 14.54 KB 0644
ndb_reconnect.result File 560 B 0644
ndb_rename.result File 772 B 0644
ndb_replace.result File 3.64 KB 0644
ndb_restore_compat_downward.result File 132.43 KB 0644
ndb_restore_compat_endianness.result File 10.87 KB 0644
ndb_restore_conv_lossy_charbinary.result File 15.46 KB 0644
ndb_restore_conv_lossy_integral.result File 20.72 KB 0644
ndb_restore_conv_padding.result File 6.14 KB 0644
ndb_restore_conv_promotion.result File 23.26 KB 0644
ndb_restore_discover.result File 540 B 0644
ndb_restore_misc.result File 23.77 KB 0644
ndb_restore_print.result File 9.8 KB 0644
ndb_restore_schema_blobs.result File 6.44 KB 0644
ndb_restore_schema_partitions.result File 13.3 KB 0644
ndb_restore_schema_rewrites.result File 12.22 KB 0644
ndb_restore_schema_subsets.result File 95.9 KB 0644
ndb_restore_schema_tolerance.result File 4.57 KB 0644
ndb_restore_undolog.result File 18.66 KB 0644
ndb_row_count.result File 5.11 KB 0644
ndb_row_format.result File 1.74 KB 0644
ndb_select_count.result File 334 B 0644
ndb_share.result File 9.85 KB 0644
ndb_short_sigs.result File 2.53 KB 0644
ndb_single_user.result File 3.97 KB 0644
ndb_sp.result File 1.1 KB 0644
ndb_sql_allow_batching.result File 918 B 0644
ndb_statistics0.result File 7.78 KB 0644
ndb_statistics1.result File 8.04 KB 0644
ndb_subquery.result File 3.07 KB 0644
ndb_temporary.result File 939 B 0644
ndb_tmp_table_and_DDL.result File 3.11 KB 0644
ndb_transaction.result File 4.62 KB 0644
ndb_trigger.result File 9.38 KB 0644
ndb_truncate.result File 425 B 0644
ndb_types.result File 3.12 KB 0644
ndb_update.result File 2.76 KB 0644
ndb_update_no_read.result File 11.37 KB 0644
ndb_view.result File 597 B 0644
ndbapi.result File 734 B 0644
ndbinfo.result File 12.86 KB 0644
ndbinfo_cache.result File 423 B 0644
ndbinfo_dump.result File 95 B 0644
ps_7ndb.result File 103.12 KB 0644
strict_autoinc_5ndb.result File 651 B 0644