mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into may.pils.ru:/home/svoj/devel/bk/mysql-4.1-engines
This commit is contained in:
@@ -178,9 +178,9 @@ t3 CREATE TABLE `t3` (
|
|||||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
|
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
|
||||||
create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
|
create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
|
||||||
select * from t4;
|
select * from t4;
|
||||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
alter table t4 add column c int;
|
alter table t4 add column c int;
|
||||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
|
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
|
||||||
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
|
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
|
||||||
@@ -775,9 +775,9 @@ DROP TABLE t1, t2;
|
|||||||
CREATE TABLE t1(a INT) ENGINE=MEMORY;
|
CREATE TABLE t1(a INT) ENGINE=MEMORY;
|
||||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
|
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
|
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
|
||||||
SELECT * FROM t2;
|
SELECT * FROM t2;
|
||||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
@@ -249,9 +249,22 @@ void ha_myisammrg::info(uint flag)
|
|||||||
if (flag & HA_STATUS_CONST)
|
if (flag & HA_STATUS_CONST)
|
||||||
{
|
{
|
||||||
if (table->key_parts && info.rec_per_key)
|
if (table->key_parts && info.rec_per_key)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_purify
|
||||||
|
/*
|
||||||
|
valgrind may be unhappy about it, because optimizer may access values
|
||||||
|
between file->keys and table->key_parts, that will be uninitialized.
|
||||||
|
It's safe though, because even if opimizer will decide to use a key
|
||||||
|
with such a number, it'll be an error later anyway.
|
||||||
|
*/
|
||||||
|
bzero((char*) table->key_info[0].rec_per_key,
|
||||||
|
sizeof(table->key_info[0].rec_per_key) * table->key_parts);
|
||||||
|
#endif
|
||||||
memcpy((char*) table->key_info[0].rec_per_key,
|
memcpy((char*) table->key_info[0].rec_per_key,
|
||||||
(char*) info.rec_per_key,
|
(char*) info.rec_per_key,
|
||||||
sizeof(table->key_info[0].rec_per_key)*table->key_parts);
|
sizeof(table->key_info[0].rec_per_key) *
|
||||||
|
min(file->keys, table->key_parts));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -184,7 +184,7 @@ character-set=latin1
|
|||||||
"INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES",
|
"INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES",
|
||||||
"Incorrect column name '%-.100s'",
|
"Incorrect column name '%-.100s'",
|
||||||
"The used storage engine can't index column '%-.64s'",
|
"The used storage engine can't index column '%-.64s'",
|
||||||
"Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exists",
|
"Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist",
|
||||||
"Can't write, because of unique constraint, to table '%-.64s'",
|
"Can't write, because of unique constraint, to table '%-.64s'",
|
||||||
"BLOB/TEXT column '%-.64s' used in key specification without a key length",
|
"BLOB/TEXT column '%-.64s' used in key specification without a key length",
|
||||||
"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead",
|
"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead",
|
||||||
|
@@ -901,6 +901,8 @@ multi_update::initialize_tables(JOIN *join)
|
|||||||
List<Item> temp_fields= *fields_for_table[cnt];
|
List<Item> temp_fields= *fields_for_table[cnt];
|
||||||
ORDER group;
|
ORDER group;
|
||||||
|
|
||||||
|
if (ignore)
|
||||||
|
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
|
||||||
if (table == main_table) // First table in join
|
if (table == main_table) // First table in join
|
||||||
{
|
{
|
||||||
if (safe_update_on_fly(join->join_tab, &temp_fields))
|
if (safe_update_on_fly(join->join_tab, &temp_fields))
|
||||||
@@ -1007,7 +1009,11 @@ multi_update::~multi_update()
|
|||||||
{
|
{
|
||||||
TABLE_LIST *table;
|
TABLE_LIST *table;
|
||||||
for (table= update_tables ; table; table= table->next)
|
for (table= update_tables ; table; table= table->next)
|
||||||
|
{
|
||||||
table->table->no_keyread= table->table->no_cache= 0;
|
table->table->no_keyread= table->table->no_cache= 0;
|
||||||
|
if (ignore)
|
||||||
|
table->table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
if (tmp_tables)
|
if (tmp_tables)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user