Commit b5cbd163 authored by istruewing@chilla.local's avatar istruewing@chilla.local

Merge chilla.local:/home/mydev/mysql-5.1-amain

into  chilla.local:/home/mydev/mysql-5.1-axmrg
parents 8b5f22a0 1f00cbd7
...@@ -362,7 +362,11 @@ sub mtr_report_stats ($) { ...@@ -362,7 +362,11 @@ sub mtr_report_stats ($) {
# BUG#29807 - innodb_mysql.test: Cannot find table test/t2 # BUG#29807 - innodb_mysql.test: Cannot find table test/t2
# from the internal data dictionary # from the internal data dictionary
/Cannot find table test\/bug29807 from the internal data dictionary/ /Cannot find table test\/bug29807 from the internal data dictionary/ or
# BUG#29839 - lowercase_table3.test: Cannot find table test/T1
# from the internal data dictiona
/Cannot find table test\/BUG29839 from the internal data dictionary/
) )
{ {
next; # Skip these lines next; # Skip these lines
......
...@@ -1030,6 +1030,7 @@ select * from t2; ...@@ -1030,6 +1030,7 @@ select * from t2;
c c
NULL NULL
1 1
Two
Three Three
lock table t2 write, t3 read; lock table t2 write, t3 read;
alter table t2 change c vc varchar(100) default "Four", rename to t1; alter table t2 change c vc varchar(100) default "Four", rename to t1;
...@@ -1046,6 +1047,7 @@ select * from t1; ...@@ -1046,6 +1047,7 @@ select * from t1;
vc vc
NULL NULL
1 1
Two
Three Three
Four Four
drop tables t1, t3; drop tables t1, t3;
......
...@@ -15,3 +15,11 @@ test.v1 check status OK ...@@ -15,3 +15,11 @@ test.v1 check status OK
test.t2 check status OK test.t2 check status OK
drop view v1; drop view v1;
drop table t1, t2; drop table t1, t2;
CREATE TEMPORARY TABLE t1(a INT);
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
DROP TABLE t1;
...@@ -1882,6 +1882,28 @@ a b ...@@ -1882,6 +1882,28 @@ a b
2 Curly 2 Curly
drop table federated.t1; drop table federated.t1;
drop table federated.t1; drop table federated.t1;
CREATE TABLE federated.t1 (a INT PRIMARY KEY) DEFAULT CHARSET=utf8;
CREATE TABLE federated.t1 (a INT PRIMARY KEY)
ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
DEFAULT CHARSET=utf8;
SELECT transactions FROM information_schema.engines WHERE engine="FEDERATED";
transactions
NO
INSERT INTO federated.t1 VALUES (1);
SET autocommit=0;
INSERT INTO federated.t1 VALUES (2);
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SET autocommit=1;
SELECT * FROM federated.t1;
a
1
2
DROP TABLE federated.t1;
DROP TABLE federated.t1;
End of 5.1 tests
DROP TABLE IF EXISTS federated.t1; DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated; DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1; DROP TABLE IF EXISTS federated.t1;
......
...@@ -4,7 +4,7 @@ SELECT * from T1; ...@@ -4,7 +4,7 @@ SELECT * from T1;
a a
drop table t1; drop table t1;
flush tables; flush tables;
CREATE TABLE t1 (a int) ENGINE=INNODB; CREATE TABLE bug29839 (a int) ENGINE=INNODB;
SELECT * from T1; SELECT * from BUG29839;
ERROR 42S02: Table 'test.T1' doesn't exist ERROR 42S02: Table 'test.BUG29839' doesn't exist
drop table t1; drop table bug29839;
...@@ -37,3 +37,12 @@ Create view v1 as Select * from t1; ...@@ -37,3 +37,12 @@ Create view v1 as Select * from t1;
Check Table v1,t2; Check Table v1,t2;
drop view v1; drop view v1;
drop table t1, t2; drop table t1, t2;
#
# BUG#26325 - TEMPORARY TABLE "corrupt" after first read, according to CHECK
# TABLE
#
CREATE TEMPORARY TABLE t1(a INT);
CHECK TABLE t1;
REPAIR TABLE t1;
DROP TABLE t1;
...@@ -25,4 +25,4 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do ...@@ -25,4 +25,4 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do
mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage mysql_upgrade : Bug#28560 test links to /usr/local/mysql/lib libraries, causes non-determinism and failures on ABI breakage
federated_innodb : Bug#29522 failed assertion in binlog_close_connection() federated_innodb : Bug#29522 failed assertion in binlog_close_connection()
lowercase_table3 : Bug#29839 2007-07-17 ingo Cannot find table test/T1 from the internal data dictionary federated_transactions : Bug#29523 Transactions do not work
...@@ -1683,4 +1683,30 @@ connection slave; ...@@ -1683,4 +1683,30 @@ connection slave;
drop table federated.t1; drop table federated.t1;
#
# BUG#29875 Disable support for transactions
#
connection slave;
CREATE TABLE federated.t1 (a INT PRIMARY KEY) DEFAULT CHARSET=utf8;
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (a INT PRIMARY KEY)
ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
DEFAULT CHARSET=utf8;
SELECT transactions FROM information_schema.engines WHERE engine="FEDERATED";
INSERT INTO federated.t1 VALUES (1);
SET autocommit=0;
INSERT INTO federated.t1 VALUES (2);
ROLLBACK;
SET autocommit=1;
SELECT * FROM federated.t1;
DROP TABLE federated.t1;
connection slave;
DROP TABLE federated.t1;
--echo End of 5.1 tests
source include/federated_cleanup.inc; source include/federated_cleanup.inc;
...@@ -27,9 +27,9 @@ flush tables; ...@@ -27,9 +27,9 @@ flush tables;
# storing things in lower case. # storing things in lower case.
# #
CREATE TABLE t1 (a int) ENGINE=INNODB; CREATE TABLE bug29839 (a int) ENGINE=INNODB;
--error 1146 --error 1146
SELECT * from T1; SELECT * from BUG29839;
drop table t1; drop table bug29839;
# End of 4.1 tests # End of 4.1 tests
...@@ -2355,7 +2355,13 @@ static bool update_frm_version(TABLE *table) ...@@ -2355,7 +2355,13 @@ static bool update_frm_version(TABLE *table)
int result= 1; int result= 1;
DBUG_ENTER("update_frm_version"); DBUG_ENTER("update_frm_version");
if (table->s->mysql_version != MYSQL_VERSION_ID) /*
No need to update frm version in case table was created or checked
by server with the same version. This also ensures that we do not
update frm version for temporary tables as this code doesn't support
temporary tables.
*/
if (table->s->mysql_version == MYSQL_VERSION_ID)
DBUG_RETURN(0); DBUG_RETURN(0);
strxmov(path, table->s->normalized_path.str, reg_ext, NullS); strxmov(path, table->s->normalized_path.str, reg_ext, NullS);
......
...@@ -878,10 +878,14 @@ ulong Query_cache::resize(ulong query_cache_size_arg) ...@@ -878,10 +878,14 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
query_cache_size= query_cache_size_arg; query_cache_size= query_cache_size_arg;
ulong new_query_cache_size= init_cache(); ulong new_query_cache_size= init_cache();
DBUG_EXECUTE("check_querycache",check_integrity(0););
STRUCT_LOCK(&structure_guard_mutex); STRUCT_LOCK(&structure_guard_mutex);
m_cache_status= Query_cache::NO_FLUSH_IN_PROGRESS; m_cache_status= Query_cache::NO_FLUSH_IN_PROGRESS;
/*
Must not call check_integrity() with
m_cache_status != Query_cache::NO_FLUSH_IN_PROGRESS.
It would wait forever.
*/
DBUG_EXECUTE("check_querycache",check_integrity(1););
pthread_cond_signal(&COND_cache_status_changed); pthread_cond_signal(&COND_cache_status_changed);
STRUCT_UNLOCK(&structure_guard_mutex); STRUCT_UNLOCK(&structure_guard_mutex);
...@@ -4025,6 +4029,10 @@ my_bool Query_cache::check_integrity(bool locked) ...@@ -4025,6 +4029,10 @@ my_bool Query_cache::check_integrity(bool locked)
Query_cache_block * block = first_block; Query_cache_block * block = first_block;
do do
{ {
/* When checking at system start, there is no block. */
if (!block)
break;
DBUG_PRINT("qcache", ("block 0x%lx, type %u...", DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
(ulong) block, (uint) block->type)); (ulong) block, (uint) block->type));
// Check allignment // Check allignment
......
...@@ -6333,11 +6333,9 @@ view_err: ...@@ -6333,11 +6333,9 @@ view_err:
{ {
VOID(pthread_mutex_lock(&LOCK_open)); VOID(pthread_mutex_lock(&LOCK_open));
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN); wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
table->file->ha_external_lock(thd, F_WRLCK); VOID(pthread_mutex_unlock(&LOCK_open));
alter_table_manage_keys(table, table->file->indexes_are_disabled(), alter_table_manage_keys(table, table->file->indexes_are_disabled(),
alter_info->keys_onoff); alter_info->keys_onoff);
table->file->ha_external_lock(thd, F_UNLCK);
VOID(pthread_mutex_unlock(&LOCK_open));
error= ha_commit_stmt(thd); error= ha_commit_stmt(thd);
if (ha_commit(thd)) if (ha_commit(thd))
error= 1; error= 1;
......
...@@ -449,6 +449,13 @@ int federated_db_init(void *p) ...@@ -449,6 +449,13 @@ int federated_db_init(void *p)
federated_hton->create= federated_create_handler; federated_hton->create= federated_create_handler;
federated_hton->flags= HTON_ALTER_NOT_SUPPORTED | HTON_NO_PARTITION; federated_hton->flags= HTON_ALTER_NOT_SUPPORTED | HTON_NO_PARTITION;
/*
Support for transactions disabled until WL#2952 fixes it.
We do it like this to avoid "defined but not used" compiler warnings.
*/
federated_hton->commit= 0;
federated_hton->rollback= 0;
if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST)) if (pthread_mutex_init(&federated_mutex, MY_MUTEX_INIT_FAST))
goto error; goto error;
if (!hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0, if (!hash_init(&federated_open_tables, &my_charset_bin, 32, 0, 0,
...@@ -3160,11 +3167,16 @@ bool ha_federated::get_error_message(int error, String* buf) ...@@ -3160,11 +3167,16 @@ bool ha_federated::get_error_message(int error, String* buf)
int ha_federated::external_lock(THD *thd, int lock_type) int ha_federated::external_lock(THD *thd, int lock_type)
{ {
int error= 0; int error= 0;
ha_federated *trx= (ha_federated *)thd->ha_data[ht->slot];
DBUG_ENTER("ha_federated::external_lock"); DBUG_ENTER("ha_federated::external_lock");
/*
Support for transactions disabled until WL#2952 fixes it.
*/
#ifdef XXX_SUPERCEDED_BY_WL2952
if (lock_type != F_UNLCK) if (lock_type != F_UNLCK)
{ {
ha_federated *trx= (ha_federated *)thd->ha_data[ht->slot];
DBUG_PRINT("info",("federated not lock F_UNLCK")); DBUG_PRINT("info",("federated not lock F_UNLCK"));
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
{ {
...@@ -3216,7 +3228,8 @@ int ha_federated::external_lock(THD *thd, int lock_type) ...@@ -3216,7 +3228,8 @@ int ha_federated::external_lock(THD *thd, int lock_type)
} }
} }
} }
DBUG_RETURN(0); #endif /* XXX_SUPERCEDED_BY_WL2952 */
DBUG_RETURN(error);
} }
......
...@@ -141,6 +141,7 @@ public: ...@@ -141,6 +141,7 @@ public:
| HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS | | HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
HA_NO_TRANSACTIONS /* until fixed by WL#2952 */ |
HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY); HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
} }
/* /*
......
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