Commit 4f3c0951 authored by vasil's avatar vasil

branches/zip: Merge revisions 4481:4710 from branches/5.1:

(resolving conflict in r4574, r4575 and skipping r4699 and r4705 because
analogous changes to r4699 and r4705 were already made to branches/zip)

  ------------------------------------------------------------------------
  r4573 | vasil | 2009-03-30 14:17:13 +0300 (Mon, 30 Mar 2009) | 4 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Fix email address from dev@innodb.com to innodb_dev_ww@oracle.com
  
  ------------------------------------------------------------------------
  r4574 | vasil | 2009-03-30 14:27:08 +0300 (Mon, 30 Mar 2009) | 38 lines
  Changed paths:
     M /branches/5.1/Makefile.am
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Restore the state of INNODB_THREAD_CONCURRENCY to silence this warning:
  
    TEST                                      RESULT   TIME (ms)
    ------------------------------------------------------------
    
    worker[1] Using MTR_BUILD_THREAD 250, with reserved ports 12500..12509
    main.innodb                              [ pass ]   8803
    
    MTR's internal check of the test case 'main.innodb' failed.
    This means that the test case does not preserve the state that existed
    before the test case was executed.  Most likely the test case did not
    do a proper clean-up.
    This is the diff of the states of the servers before and after the
    test case was executed:
    mysqltest: Logging to '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.log'.
    mysqltest: Results saved in '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result'.
    mysqltest: Connecting to server localhost:12500 (socket /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
    mysqltest: ... Connected.
    mysqltest: Start processing test commands from './include/check-testcase.test' ...
    mysqltest: ... Done processing test commands.
    --- /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result	2009-03-30 14:12:31.000000000 +0300
    +++ /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.reject	2009-03-30 14:12:41.000000000 +0300
    @@ -99,7 +99,7 @@
     INNODB_SUPPORT_XA	ON
     INNODB_SYNC_SPIN_LOOPS	20
     INNODB_TABLE_LOCKS	ON
    -INNODB_THREAD_CONCURRENCY	8
    +INNODB_THREAD_CONCURRENCY	16
     INNODB_THREAD_SLEEP_DELAY	10000
     INSERT_ID	0
     INTERACTIVE_TIMEOUT	28800
    
    mysqltest: Result content mismatch
    
    not ok
  
  ------------------------------------------------------------------------
  r4575 | vasil | 2009-03-30 15:55:31 +0300 (Mon, 30 Mar 2009) | 8 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.result
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Fix Bug#43309 Test main.innodb can't be run twice
  
  Make the innodb mysql-test more flexible by inspecting how much a
  variable of interest has changed since the start of the test. Do not
  assume the variables have zero values at the start of the test.
  
  ------------------------------------------------------------------------
  r4576 | vasil | 2009-03-30 16:25:10 +0300 (Mon, 30 Mar 2009) | 4 lines
  Changed paths:
     M /branches/5.1/Makefile.am
  
  branches/5.1:
  
  Revert a change to Makefile.am that I committed accidentally in c4574.
  
  ------------------------------------------------------------------------
  r4659 | vasil | 2009-04-06 15:34:51 +0300 (Mon, 06 Apr 2009) | 6 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb.test
  
  branches/5.1:
  
  Followup to r4575 and the fix of Bug#43309 Test main.innodb can't be run twice:
  
  Add an explanatory comment, as suggested by Patrick Crews in the bug report.
  
  ------------------------------------------------------------------------
  r4699 | vasil | 2009-04-09 14:01:52 +0300 (Thu, 09 Apr 2009) | 15 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/include/srv0srv.h
     M /branches/5.1/page/page0cur.c
     M /branches/5.1/srv/srv0srv.c
  
  branches/5.1:
  
  Fix Bug#43660 SHOW INDEXES/ANALYZE does NOT update cardinality for indexes
  of InnoDB table
  
  by replacing the PRNG that is used to pick random pages with a better
  one.
  
  This is based on r4670 but also adds a new configuration option and
  enables the fix only if this option is changed. Please skip the present
  revision when merging.
  
  Approved by:	Heikki (via email)
  
  
  ------------------------------------------------------------------------
  r4705 | vasil | 2009-04-14 14:30:13 +0300 (Tue, 14 Apr 2009) | 5 lines
  Changed paths:
     M /branches/5.1/page/page0cur.c
  
  branches/5.1:
  
  When using the random function, first take the modulus by the number of pages
  and then typecast to ulint.
  
  ------------------------------------------------------------------------
  r4710 | vasil | 2009-04-15 11:55:18 +0300 (Wed, 15 Apr 2009) | 25 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
  
  branches/5.1:
  
  Merge a change from MySQL (looks like this is against 5.0 but they later
  merged it to 5.1):
  
    ------------------------------------------------------------
    revno: 1810.3846.1
    committer: Alexey Botchkov <holyfoot@mysql.com>
    branch nick: 31435
    timestamp: Tue 2008-11-11 14:42:32 +0400
    message:
      Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse 
          I think we don't need to issue an error statement in the convert_search_mode_to_innobase().
          Returning the PAGE_CUR_UNSUPP value is enough as allows to handle this
          case depending on the requirements.
      
      per-file comments:
        sql/ha_innodb.cc 
      Bug#31435 ha_innodb.cc:3983: ulint convert_search_mode_to_innobase(ha_rkey_function): Asse 
           no error issued in convert_search_mode_to_innobase.
           ha_innobase::records_in_range() returns HA_POS_ERROR if search mode isn't supported.
    modified:
      sql/ha_innodb.cc
  
  
  ------------------------------------------------------------------------
parent 319f148e
...@@ -4780,7 +4780,6 @@ convert_search_mode_to_innobase( ...@@ -4780,7 +4780,6 @@ convert_search_mode_to_innobase(
case HA_READ_MBR_WITHIN: case HA_READ_MBR_WITHIN:
case HA_READ_MBR_DISJOINT: case HA_READ_MBR_DISJOINT:
case HA_READ_MBR_EQUAL: case HA_READ_MBR_EQUAL:
my_error(ER_TABLE_CANT_HANDLE_SPKEYS, MYF(0));
return(PAGE_CUR_UNSUPP); return(PAGE_CUR_UNSUPP);
/* do not use "default:" in order to produce a gcc warning: /* do not use "default:" in order to produce a gcc warning:
enumeration value '...' not handled in switch enumeration value '...' not handled in switch
...@@ -6673,7 +6672,7 @@ ha_innobase::records_in_range( ...@@ -6673,7 +6672,7 @@ ha_innobase::records_in_range(
mode2); mode2);
} else { } else {
n_rows = 0; n_rows = HA_POS_ERROR;
} }
mem_heap_free(heap); mem_heap_free(heap);
......
...@@ -1736,36 +1736,36 @@ select count(*) from t1 where x = 18446744073709551601; ...@@ -1736,36 +1736,36 @@ 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"; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
Variable_name Value variable_value
Innodb_buffer_pool_pages_total 511 511
show status like "Innodb_page_size"; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
Variable_name Value variable_value
Innodb_page_size 16384 16384
show status like "Innodb_rows_deleted"; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
Variable_name Value variable_value - @innodb_rows_deleted_orig
Innodb_rows_deleted 71 71
show status like "Innodb_rows_inserted"; SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
Variable_name Value variable_value - @innodb_rows_inserted_orig
Innodb_rows_inserted 1084 1084
show status like "Innodb_rows_updated"; SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
Variable_name Value variable_value - @innodb_rows_updated_orig
Innodb_rows_updated 885 885
show status like "Innodb_row_lock_waits"; SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
Variable_name Value variable_value - @innodb_row_lock_waits_orig
Innodb_row_lock_waits 0 0
show status like "Innodb_row_lock_current_waits"; SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
Variable_name Value variable_value - @innodb_row_lock_current_waits_orig
Innodb_row_lock_current_waits 0 0
show status like "Innodb_row_lock_time"; SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
Variable_name Value variable_value - @innodb_row_lock_time_orig
Innodb_row_lock_time 0 0
show status like "Innodb_row_lock_time_max"; SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
Variable_name Value variable_value - @innodb_row_lock_time_max_orig
Innodb_row_lock_time_max 0 0
show status like "Innodb_row_lock_time_avg"; SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
Variable_name Value variable_value - @innodb_row_lock_time_avg_orig
Innodb_row_lock_time_avg 0 0
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
Variable_name Value Variable_name Value
innodb_sync_spin_loops 20 innodb_sync_spin_loops 20
......
...@@ -6,22 +6,45 @@ ...@@ -6,22 +6,45 @@
# Use innodb_mysql.[test|result] files instead. # # Use innodb_mysql.[test|result] files instead. #
# # # #
# If nevertheless you need to make some changes here, please, forward # # If nevertheless you need to make some changes here, please, forward #
# your commit message To: dev@innodb.com Cc: dev-innodb@mysql.com # # your commit message #
# To: innodb_dev_ww@oracle.com #
# Cc: dev-innodb@mysql.com #
# (otherwise your changes may be erased). # # (otherwise your changes may be erased). #
# # # #
####################################################################### #######################################################################
-- source include/have_innodb.inc -- source include/have_innodb.inc
# # Save the original values of some variables in order to be able to
# Small basic test with ignore # estimate how much they have changed during the tests. Previously this
# # test assumed that e.g. rows_deleted is 0 here and after deleting 23
# rows it expected that rows_deleted will be 23. Now we do not make
# assumptions about the values of the variables at the beginning, e.g.
# rows_deleted should be 23 + "rows_deleted before the test". This allows
# the test to be run multiple times without restarting the mysqld server.
# See Bug#43309 Test main.innodb can't be run twice
-- disable_query_log
SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
SET @innodb_row_lock_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits');
SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits');
SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
-- enable_query_log
--disable_warnings --disable_warnings
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
drop database if exists mysqltest; drop database if exists mysqltest;
--enable_warnings --enable_warnings
#
# Small basic test with ignore
#
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb; create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt'); insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
...@@ -1295,18 +1318,18 @@ drop table t1; ...@@ -1295,18 +1318,18 @@ drop table t1;
# Test for testable InnoDB status variables. This test # Test for testable InnoDB status variables. This test
# uses previous ones(pages_created, rows_deleted, ...). # uses previous ones(pages_created, rows_deleted, ...).
--replace_result 512 511 --replace_result 512 511
show status like "Innodb_buffer_pool_pages_total"; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
show status like "Innodb_page_size"; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
show status like "Innodb_rows_deleted"; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
show status like "Innodb_rows_inserted"; SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
show status like "Innodb_rows_updated"; SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
# Test for row locks InnoDB status variables. # Test for row locks InnoDB status variables.
show status like "Innodb_row_lock_waits"; SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
show status like "Innodb_row_lock_current_waits"; SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
show status like "Innodb_row_lock_time"; SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
show status like "Innodb_row_lock_time_max"; SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
show status like "Innodb_row_lock_time_avg"; SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
# Test for innodb_sync_spin_loops variable # Test for innodb_sync_spin_loops variable
show variables like "innodb_sync_spin_loops"; show variables like "innodb_sync_spin_loops";
...@@ -2524,6 +2547,8 @@ DROP TABLE bug35537; ...@@ -2524,6 +2547,8 @@ DROP TABLE bug35537;
DISCONNECT c1; DISCONNECT c1;
CONNECTION default; CONNECTION default;
SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-- enable_query_log -- enable_query_log
####################################################################### #######################################################################
...@@ -2534,7 +2559,9 @@ CONNECTION default; ...@@ -2534,7 +2559,9 @@ CONNECTION default;
# Use innodb_mysql.[test|result] files instead. # # Use innodb_mysql.[test|result] files instead. #
# # # #
# If nevertheless you need to make some changes here, please, forward # # If nevertheless you need to make some changes here, please, forward #
# your commit message To: dev@innodb.com Cc: dev-innodb@mysql.com # # your commit message #
# To: innodb_dev_ww@oracle.com #
# Cc: dev-innodb@mysql.com #
# (otherwise your changes may be erased). # # (otherwise your changes may be erased). #
# # # #
####################################################################### #######################################################################
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