Skip to content

Commit

Permalink
Speed up some innodb tests
Browse files Browse the repository at this point in the history
Fixed compiler warnings

sql/sql_view.cc:
Ensure that merged_for_insert is properly reset
(Left of an old patch)
  • Loading branch information
montywi authored and vuvova committed Oct 5, 2015
1 parent b2b07b3 commit 7e31279
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 2 deletions.
15 changes: 15 additions & 0 deletions mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ SET GLOBAL innodb_simulate_comp_failures = 25;
--disable_result_log

let $num_inserts_ind = $num_inserts;
let $commit_iterations=50;

while ($num_inserts_ind)
{
let $repeat = `select floor(rand() * 10)`;
Expand All @@ -49,6 +51,9 @@ SELECT COUNT(*) FROM t1;

# do random ops, making sure that some pages will get fragmented and reorganized.
let $num_ops_ind = $num_ops;
let $commit_count= $commit_iterations;

BEGIN;

while($num_ops_ind)
{
Expand Down Expand Up @@ -133,9 +138,19 @@ while($num_ops_ind)
}
}
dec $commit_count;
if (!$commit_count)
{
let $commit_count= $commit_iterations;
COMMIT;
BEGIN;
}
dec $num_ops_ind;
}
COMMIT;
# final cleanup
DROP TABLE t1;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/r/innodb-bigblob.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
call mtr.add_suppression("Resizing redo log from *");
call mtr.add_suppression("Starting to delete and rewrite log files.");
call mtr.add_suppression("New log files created, LSN=*");
call mtr.add_suppression("Writer thread is waiting this semaphore");
create table foo (id varchar(37) not null, content longblob) engine=INNODB;
insert into foo (id, content) values('xyz', '');
update foo set content=repeat('a', 43941888) where id='xyz';
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/t/innodb-bigblob.opt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--max-allowed-packet=128M
--innodb-log-file-size=210M
--skip-innodb-doublewrite
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/t/innodb-bigblob.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let $status_orig=`SELECT @@innodb_status_output`;
call mtr.add_suppression("Resizing redo log from *");
call mtr.add_suppression("Starting to delete and rewrite log files.");
call mtr.add_suppression("New log files created, LSN=*");
call mtr.add_suppression("Writer thread is waiting this semaphore");

create table foo (id varchar(37) not null, content longblob) engine=INNODB;
insert into foo (id, content) values('xyz', '');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--innodb-file-per-table

--skip-innodb-doublewrite
5 changes: 5 additions & 0 deletions sql/sql_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,11 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
*/
table->open_type= OT_BASE_ONLY;

/*
Clear old variables in the TABLE_LIST that could be left from an old view
*/
table->merged_for_insert= FALSE;

/*TODO: md5 test here and warning if it is differ */


Expand Down
2 changes: 1 addition & 1 deletion storage/mroonga/vendor/groonga/lib/operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ grn_operator_exec_equal(grn_ctx *ctx, grn_obj *x, grn_obj *y)
grn_bool
grn_operator_exec_not_equal(grn_ctx *ctx, grn_obj *x, grn_obj *y)
{
grn_bool r;
grn_bool r= 0;
GRN_API_ENTER;
DO_EQ(x, y, r);
GRN_API_RETURN(!r);
Expand Down

0 comments on commit 7e31279

Please sign in to comment.