Commit 9da072cb authored by pgalbraith/patg@govinda.patg.net's avatar pgalbraith/patg@govinda.patg.net

Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0-engines

into  govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
parents b2ce951b 6b962942
......@@ -1784,7 +1784,33 @@ length(a)
5000
drop table t1;
drop table t1;
End of 5.0 tests
DROP TABLE IF EXISTS federated.test;
CREATE TABLE federated.test (
`i` int(11) NOT NULL,
`j` int(11) NOT NULL,
`c` varchar(30) default NULL,
PRIMARY KEY (`i`,`j`),
UNIQUE KEY `i` (`i`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.test1;
DROP TABLE IF EXISTS federated.test2;
create table federated.test1 (
i int not null,
j int not null,
c varchar(30),
primary key (i,j),
unique key (i, c))
engine = federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
create table federated.test2 (
i int default null,
j int not null,
c varchar(30),
key (i))
engine = federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
drop table federated.test1, federated.test2;
drop table federated.test;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
......
......@@ -72,7 +72,7 @@ drop table t1;
create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../std_data_ln/warnings_loaddata.dat' into table t1 fields terminated by ',';
Warnings:
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2
Warning 1265 Data truncated for column 'd' at row 3
Warning 1265 Data truncated for column 'c' at row 4
Warning 1261 Row 5 doesn't contain data for all columns
......
......@@ -1553,5 +1553,49 @@ drop table t1;
connection master;
drop table t1;
--echo End of 5.0 tests
#
# BUG #15133: unique index with nullable value not accepted in federated table
#
connection slave;
--disable_warnings
DROP TABLE IF EXISTS federated.test;
CREATE TABLE federated.test (
`i` int(11) NOT NULL,
`j` int(11) NOT NULL,
`c` varchar(30) default NULL,
PRIMARY KEY (`i`,`j`),
UNIQUE KEY `i` (`i`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--enable_warnings
connection master;
--disable_warnings
DROP TABLE IF EXISTS federated.test1;
DROP TABLE IF EXISTS federated.test2;
--enable_warnings
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create table federated.test1 (
i int not null,
j int not null,
c varchar(30),
primary key (i,j),
unique key (i, c))
engine = federated
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create table federated.test2 (
i int default null,
j int not null,
c varchar(30),
key (i))
engine = federated
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/test';
drop table federated.test1, federated.test2;
connection slave;
drop table federated.test;
source include/federated_cleanup.inc;
......@@ -332,6 +332,7 @@
*/
#include "mysql_priv.h"
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
......
......@@ -117,9 +117,10 @@ public:
ulonglong table_flags() const
{
/* fix server to be able to get remote server table flags */
return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED | HA_REC_NOT_IN_SEQ |
HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS| HA_NO_PREFIX_CHAR_KEYS |
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_PARTIAL_COLUMN_READ);
return (HA_NOT_EXACT_COUNT | HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED
| HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
}
/*
This is a bitmap of flags that says how the storage engine
......
......@@ -4871,8 +4871,8 @@ ER_WARN_TOO_MANY_RECORDS 01000
por "Conta de registro maior que a conta de coluna na linha %ld"
spa "Lnea %ld fu truncada; La misma contine mas datos que las que existen en las columnas de entrada"
ER_WARN_NULL_TO_NOTNULL 22004
eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld"
ger "Feld auf Vorgabewert gesetzt, da NULL fr NOT-NULL-Feld '%s' in Zeile %ld angegeben"
eng "Column was set to data type implicit default; NULL supplied for NOT NULL column '%s' at row %ld"
ger "Feld auf Datentyp-spezifischen Vorgabewert gesetzt; da NULL fr NOT-NULL-Feld '%s' in Zeile %ld angegeben"
por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld"
spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la lnea %ld"
ER_WARN_DATA_OUT_OF_RANGE 22003
......
......@@ -180,7 +180,7 @@ static int tina_done_func()
}
return 0;
}
/*
Simple lock controls.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment