mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Import those changes from mysql-5.1-new ChangeSet 1.1979 (Lars Thalmann)
that were not part of r154. (Bug #3300) innodb.test, innodb.result: Remove binlog related tests, because they are not InnoDB specific; they merely require a transactional table. ha_innobase::ha_innobase(): Add HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS to table_flags. ha_innobase::rnd_init(): Disable semi-consistent read for random access.
This commit is contained in:
parent
f6e307752d
commit
bf58448f97
3 changed files with 8 additions and 81 deletions
|
@ -828,6 +828,7 @@ ha_innobase::ha_innobase(TABLE_SHARE *table_arg)
|
||||||
HA_CAN_INDEX_BLOBS |
|
HA_CAN_INDEX_BLOBS |
|
||||||
HA_CAN_SQL_HANDLER |
|
HA_CAN_SQL_HANDLER |
|
||||||
HA_NOT_EXACT_COUNT |
|
HA_NOT_EXACT_COUNT |
|
||||||
|
HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS |
|
||||||
HA_PRIMARY_KEY_IN_READ_INDEX |
|
HA_PRIMARY_KEY_IN_READ_INDEX |
|
||||||
HA_CAN_GEOMETRY |
|
HA_CAN_GEOMETRY |
|
||||||
HA_TABLE_SCAN_ON_INDEX),
|
HA_TABLE_SCAN_ON_INDEX),
|
||||||
|
@ -4401,6 +4402,13 @@ ha_innobase::rnd_init(
|
||||||
err = change_active_index(primary_key);
|
err = change_active_index(primary_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Don't use semi-consistent read in random row reads (by position).
|
||||||
|
This means we must disable semi_consistent_read if scan is false */
|
||||||
|
|
||||||
|
if (!scan) {
|
||||||
|
try_semi_consistent_read(0);
|
||||||
|
}
|
||||||
|
|
||||||
start_of_scan = 1;
|
start_of_scan = 1;
|
||||||
|
|
||||||
return(err);
|
return(err);
|
||||||
|
|
|
@ -1640,29 +1640,6 @@ t2 CREATE TABLE `t2` (
|
||||||
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
|
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
drop table t2, t1;
|
drop table t2, t1;
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 155
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 0
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 156
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_use 157
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
Variable_name Value
|
|
||||||
Binlog_cache_disk_use 1
|
|
||||||
drop table t1;
|
|
||||||
create table t1 (c char(10), index (c,c)) engine=innodb;
|
create table t1 (c char(10), index (c,c)) engine=innodb;
|
||||||
ERROR 42S21: Duplicate column name 'c'
|
ERROR 42S21: Duplicate column name 'c'
|
||||||
create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
|
create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
|
||||||
|
@ -1774,21 +1751,6 @@ select count(*) from t1 where x = 18446744073709551601;
|
||||||
count(*)
|
count(*)
|
||||||
1
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
show status like "Innodb_buffer_pool_pages_total";
|
|
||||||
Variable_name Value
|
|
||||||
Innodb_buffer_pool_pages_total 512
|
|
||||||
show status like "Innodb_page_size";
|
|
||||||
Variable_name Value
|
|
||||||
Innodb_page_size 16384
|
|
||||||
show status like "Innodb_rows_deleted";
|
|
||||||
Variable_name Value
|
|
||||||
Innodb_rows_deleted 2070
|
|
||||||
show status like "Innodb_rows_inserted";
|
|
||||||
Variable_name Value
|
|
||||||
Innodb_rows_inserted 31727
|
|
||||||
show status like "Innodb_rows_updated";
|
|
||||||
Variable_name Value
|
|
||||||
Innodb_rows_updated 29530
|
|
||||||
show status like "Innodb_row_lock_waits";
|
show status like "Innodb_row_lock_waits";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Innodb_row_lock_waits 0
|
Innodb_row_lock_waits 0
|
||||||
|
|
|
@ -1141,40 +1141,6 @@ show create table t2;
|
||||||
drop table t2, t1;
|
drop table t2, t1;
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
|
|
||||||
# Actually this test has nothing to do with innodb per se, it just requires
|
|
||||||
# transactional table.
|
|
||||||
#
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
|
|
||||||
create table t1 (a int) engine=innodb;
|
|
||||||
|
|
||||||
# Now we are going to create transaction which is long enough so its
|
|
||||||
# transaction binlog will be flushed to disk...
|
|
||||||
let $1=2000;
|
|
||||||
disable_query_log;
|
|
||||||
begin;
|
|
||||||
while ($1)
|
|
||||||
{
|
|
||||||
eval insert into t1 values( $1 );
|
|
||||||
dec $1;
|
|
||||||
}
|
|
||||||
commit;
|
|
||||||
enable_query_log;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
|
|
||||||
# Transaction which should not be flushed to disk and so should not
|
|
||||||
# increase binlog_cache_disk_use.
|
|
||||||
begin;
|
|
||||||
delete from t1;
|
|
||||||
commit;
|
|
||||||
show status like "binlog_cache_use";
|
|
||||||
show status like "binlog_cache_disk_use";
|
|
||||||
drop table t1;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #6126: Duplicate columns in keys gives misleading error message
|
# Bug #6126: Duplicate columns in keys gives misleading error message
|
||||||
#
|
#
|
||||||
|
@ -1289,15 +1255,6 @@ select * from t1 where x > -16;
|
||||||
select count(*) from t1 where x = 18446744073709551601;
|
select count(*) from t1 where x = 18446744073709551601;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
# Test for testable InnoDB status variables. This test
|
|
||||||
# uses previous ones(pages_created, rows_deleted, ...).
|
|
||||||
show status like "Innodb_buffer_pool_pages_total";
|
|
||||||
show status like "Innodb_page_size";
|
|
||||||
show status like "Innodb_rows_deleted";
|
|
||||||
show status like "Innodb_rows_inserted";
|
|
||||||
show status like "Innodb_rows_updated";
|
|
||||||
|
|
||||||
# Test for row locks InnoDB status variables.
|
# Test for row locks InnoDB status variables.
|
||||||
show status like "Innodb_row_lock_waits";
|
show status like "Innodb_row_lock_waits";
|
||||||
show status like "Innodb_row_lock_current_waits";
|
show status like "Innodb_row_lock_current_waits";
|
||||||
|
|
Loading…
Add table
Reference in a new issue