[Commits] Rev 3368: Merge. in file:///home/igor/maria/maria-5.5-mwl248-bugs/

Igor Babaev igor at askmonty.org
Sat Sep 8 22:07:15 EEST 2012


At file:///home/igor/maria/maria-5.5-mwl248-bugs/

------------------------------------------------------------
revno: 3368 [merge]
revision-id: igor at askmonty.org-20120908190714-cguiubk7dubk6w08
parent: igor at askmonty.org-20120908190431-mje3j7ostvsm7g18
parent: elenst at ubuntu11.home-20120903180152-r1n87m6pcvzffh63
committer: Igor Babaev <igor at askmonty.org>
branch nick: maria-5.5-mwl248-bugs
timestamp: Sat 2012-09-08 12:07:14 -0700
message:
  Merge.
added:
  mysql-test/r/mdev-504.result   mdev504.result-20120903180145-bms0iez3rek407x1-1
  mysql-test/t/mdev-504.test     mdev504.test-20120903180145-bms0iez3rek407x1-2
-------------- next part --------------
=== added file 'mysql-test/r/mdev-504.result'
--- a/mysql-test/r/mdev-504.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/mdev-504.result	2012-09-03 18:01:52 +0000
@@ -0,0 +1,21 @@
+CREATE TABLE A (
+pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+fdate DATE
+) ENGINE=MyISAM;
+CREATE PROCEDURE p_analyze()
+BEGIN
+DECLARE attempts INTEGER DEFAULT 100;
+wl_loop: WHILE attempts > 0 DO
+ANALYZE TABLE A;
+SET attempts = attempts - 1;
+END WHILE wl_loop;
+END |
+CREATE FUNCTION rnd3() RETURNS INT
+BEGIN
+RETURN ROUND(3 * RAND() + 0.5);
+END |
+SET GLOBAL use_stat_tables = PREFERABLY;
+DROP TABLE A;
+DROP PROCEDURE p_analyze;
+DROP FUNCTION rnd3;
+SET GLOBAL use_stat_tables = DEFAULT;

=== added file 'mysql-test/t/mdev-504.test'
--- a/mysql-test/t/mdev-504.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mdev-504.test	2012-09-03 18:01:52 +0000
@@ -0,0 +1,75 @@
+CREATE TABLE A (
+  pk INTEGER AUTO_INCREMENT PRIMARY KEY,
+  fdate DATE
+) ENGINE=MyISAM;
+
+--delimiter |
+
+CREATE PROCEDURE p_analyze()
+BEGIN
+  DECLARE attempts INTEGER DEFAULT 100;
+  wl_loop: WHILE attempts > 0 DO
+    ANALYZE TABLE A;
+    SET attempts = attempts - 1;
+  END WHILE wl_loop;
+END |
+
+CREATE FUNCTION rnd3() RETURNS INT
+BEGIN
+  RETURN ROUND(3 * RAND() + 0.5);
+END |
+
+--delimiter ;
+
+SET GLOBAL use_stat_tables = PREFERABLY;  
+
+--let $trial = 100
+
+--disable_query_log
+--disable_result_log
+--disable_warnings
+while ($trial)
+{
+
+  --connect (con1,localhost,root,,)
+  --send CALL p_analyze()
+
+  --connect (con2,localhost,root,,)
+  --send CALL p_analyze()
+
+  --let $run = 100
+
+  while ($run)
+  {
+    --connect (con3,localhost,root,,)
+  
+    let $query = `SELECT CASE rnd3() 
+      WHEN 1 THEN 'INSERT INTO A (pk) VALUES (NULL)'
+      WHEN 2 THEN 'DELETE FROM A LIMIT 1'
+      ELSE 'UPDATE A SET fdate = 2 LIMIT 1' END`;
+    --eval $query
+    --disconnect con3
+    --dec $run
+  }
+
+  --connection con2
+  --reap
+  --disconnect con2
+  --connection con1
+  --reap
+  --disconnect con1
+
+  --dec $trial
+}
+
+--enable_query_log
+--enable_result_log
+--enable_warnings
+
+# Cleanup
+--connection default
+DROP TABLE A;
+DROP PROCEDURE p_analyze;
+DROP FUNCTION rnd3;
+SET GLOBAL use_stat_tables = DEFAULT;
+



More information about the commits mailing list