Commit 85ce9919 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/jonas/src/kalle

into mysql.com:/home/jonas/src/new-fix


ndb/src/ndbapi/NdbDictionary.cpp:
  Auto merged
parents 15f7e7ad 7240a4d3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
flush status;
create table t1(
id int not null primary key,
@@ -363,3 +363,8 @@ a int NOT NULL PRIMARY KEY,
b int
) engine=ndb;
insert t9 values(1, 2), (2,3), (3, 4), (4, 5);
create table t10 (
a int not null primary key,
b blob
) engine=ndb;
insert into t10 values (1, 'kalle');
+3 −0
Original line number Diff line number Diff line
@@ -8,3 +8,6 @@ show status like 'handler_discover%';
Variable_name	Value
Handler_discover	1
drop table t9;
select * from t10;
ERROR HY000: Got error 4263 'Invalid blob attributes or invalid blob parts table' from ndbcluster
drop table t10;
+36 −1
Original line number Diff line number Diff line
drop table if exists t1;
drop table if exists t1, test1, test2;
CREATE TABLE t1 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -275,3 +275,38 @@ a b c
1	1	1
4	4	NULL
drop table t1;
CREATE TABLE test1 (
SubscrID int(11) NOT NULL auto_increment,
UsrID int(11) NOT NULL default '0',
PRIMARY KEY  (SubscrID),
KEY idx_usrid (UsrID)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO test1 VALUES (2,224),(3,224),(1,224);
CREATE TABLE test2 (
SbclID int(11) NOT NULL auto_increment,
SbcrID int(11) NOT NULL default '0',
PRIMARY KEY  (SbclID),
KEY idx_sbcrid (SbcrID)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO test2 VALUES (3,2),(1,1),(2,1),(4,2);
select * from test1 order by 1;
SubscrID	UsrID
1	224
2	224
3	224
select * from test2 order by 1;
SbclID	SbcrID
1	1
2	1
3	2
4	2
SELECT s.SubscrID,l.SbclID FROM test1 s left JOIN test2 l ON
l.SbcrID=s.SubscrID WHERE s.UsrID=224 order by 1, 2;
SubscrID	SbclID
1	1
1	2
2	3
2	4
3	NULL
drop table test1;
drop table test2;
+16 −0
Original line number Diff line number Diff line
@@ -561,3 +561,19 @@ select count(*) from t1 where x = 18446744073709551601;
count(*)
1
drop table t1;
set names latin1;
create table t1 (a char(10), b text, key (a)) character set latin1;
INSERT INTO t1 (a) VALUES
('111'),('222'),('222'),('222'),('222'),('444'),('aaa'),('AAA'),('bbb');
explain select * from t1 where a='aaa';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ref	a	a	11	const	2	Using where
explain select * from t1 where a=binary 'aaa';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	11	NULL	2	Using where
explain select * from t1 where a='aaa' collate latin1_bin;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	a	a	11	NULL	2	Using where
explain select * from t1 where a='aaa' collate latin1_german1_ci;
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	ALL	a	NULL	NULL	NULL	9	Using where
+7 −1
Original line number Diff line number Diff line
-- source include/have_ndb.inc

--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--enable_warnings

################################################
@@ -472,5 +472,11 @@ system rm var/master-data/test/t9.frm ;
# MySQL Server will have been restarted because it has a 
# ndb_autodiscover2-master.opt file.

create table t10 (
  a int not null primary key,
  b blob
) engine=ndb;

insert into t10 values (1, 'kalle');

--exec $NDB_TOOLS_DIR/ndb_drop_table -d test `$NDB_TOOLS_DIR/ndb_show_tables | grep BLOB` > /dev/null 2>&1 || true
Loading