From cf481848ac7d0c4a4afdc81e95882ca88c6e1c57 Mon Sep 17 00:00:00 2001 From: Alexander Soklakov Date: Wed, 20 Sep 2017 12:48:26 +0400 Subject: [PATCH] Fix for Bug#26794652, TEST FAILING DUE TO BINARY LOGGING ENABLED BY DEFAULT IN MYSQL 8.0.3. --- CHANGES | 2 ++ .../regression/CallableStatementRegressionTest.java | 2 +- .../regression/jdbc4/MetaDataRegressionTest.java | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 4c4fda8f1..c2f4b53cc 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,8 @@ Version 5.1.45 + - Fix for Bug#26794652, TEST FAILING DUE TO BINARY LOGGING ENABLED BY DEFAULT IN MYSQL 8.0.3. + - Fix for Bug#26794602, TESTS FAILING DUE TO CHANGE IN INFORMATION_SCHEMA.INNODB_SYS_* NAMING. - Fix for Bug#87704 (26771560), THE STREAM GETS THE RESULT SET ?THE DRIVER SIDE GET WRONG ABOUT GETLONG(). diff --git a/src/testsuite/regression/CallableStatementRegressionTest.java b/src/testsuite/regression/CallableStatementRegressionTest.java index 736dea0c0..194d9be60 100644 --- a/src/testsuite/regression/CallableStatementRegressionTest.java +++ b/src/testsuite/regression/CallableStatementRegressionTest.java @@ -1696,7 +1696,7 @@ public Void call() throws Exception { /* * Test function. */ - createFunction("`testBug84324-db`.`testBug84324-func`", "(a INT, b VARCHAR(123)) RETURNS INT BEGIN RETURN a + LENGTH(b); END"); + createFunction("`testBug84324-db`.`testBug84324-func`", "(a INT, b VARCHAR(123)) RETURNS INT DETERMINISTIC BEGIN RETURN a + LENGTH(b); END"); final CallableStatement cstmtF = this.conn.prepareCall("{? = CALL testBug84324-db.testBug84324-func(?, ?)}"); pmd = cstmtF.getParameterMetaData(); diff --git a/src/testsuite/regression/jdbc4/MetaDataRegressionTest.java b/src/testsuite/regression/jdbc4/MetaDataRegressionTest.java index ac89b3322..6742b2be3 100644 --- a/src/testsuite/regression/jdbc4/MetaDataRegressionTest.java +++ b/src/testsuite/regression/jdbc4/MetaDataRegressionTest.java @@ -691,7 +691,7 @@ public void testBug19803348() throws Exception { createDatabase(testDb2); // 1. Check if getProcedures() and getProcedureColumns() aren't returning more results than expected (as per reported bug). - createFunction(testDb1 + ".testBug19803348_f", "(d INT) RETURNS INT BEGIN RETURN d; END"); + createFunction(testDb1 + ".testBug19803348_f", "(d INT) RETURNS INT DETERMINISTIC BEGIN RETURN d; END"); createProcedure(testDb1 + ".testBug19803348_p", "(d int) BEGIN SELECT d; END"); this.rs = dbmd.getFunctions(null, null, "testBug19803348_%"); @@ -728,9 +728,9 @@ public void testBug19803348() throws Exception { dropProcedure(testDb1 + ".testBug19803348_p"); // 2. Check if the results from getProcedures() and getProcedureColumns() are in the right order (secondary bug). - createFunction(testDb1 + ".testBug19803348_B_f", "(d INT) RETURNS INT BEGIN RETURN d; END"); + createFunction(testDb1 + ".testBug19803348_B_f", "(d INT) RETURNS INT DETERMINISTIC BEGIN RETURN d; END"); createProcedure(testDb1 + ".testBug19803348_B_p", "(d int) BEGIN SELECT d; END"); - createFunction(testDb2 + ".testBug19803348_A_f", "(d INT) RETURNS INT BEGIN RETURN d; END"); + createFunction(testDb2 + ".testBug19803348_A_f", "(d INT) RETURNS INT DETERMINISTIC BEGIN RETURN d; END"); createProcedure(testDb2 + ".testBug19803348_A_p", "(d int) BEGIN SELECT d; END"); this.rs = dbmd.getFunctions(null, null, "testBug19803348_%"); @@ -797,9 +797,9 @@ public void testBug19803348() throws Exception { * if the test fails. */ public void testBug20727196() throws Exception { - createFunction("testBug20727196_f1", "(p ENUM ('Yes', 'No')) RETURNS VARCHAR(10) BEGIN RETURN IF(p='Yes', 'Yay!', if(p='No', 'Ney!', 'What?')); END"); - createFunction("testBug20727196_f2", "(p CHAR(1)) RETURNS ENUM ('Yes', 'No') BEGIN RETURN IF(p='y', 'Yes', if(p='n', 'No', '?')); END"); - createFunction("testBug20727196_f3", "(p ENUM ('Yes', 'No')) RETURNS ENUM ('Yes', 'No') BEGIN RETURN IF(p='Yes', 'Yes', if(p='No', 'No', '?')); END"); + createFunction("testBug20727196_f1", "(p ENUM ('Yes', 'No')) RETURNS VARCHAR(10) DETERMINISTIC BEGIN RETURN IF(p='Yes', 'Yay!', if(p='No', 'Ney!', 'What?')); END"); + createFunction("testBug20727196_f2", "(p CHAR(1)) RETURNS ENUM ('Yes', 'No') DETERMINISTIC BEGIN RETURN IF(p='y', 'Yes', if(p='n', 'No', '?')); END"); + createFunction("testBug20727196_f3", "(p ENUM ('Yes', 'No')) RETURNS ENUM ('Yes', 'No') DETERMINISTIC BEGIN RETURN IF(p='Yes', 'Yes', if(p='No', 'No', '?')); END"); createProcedure("testBug20727196_p1", "(p ENUM ('Yes', 'No')) BEGIN SELECT IF(p='Yes', 'Yay!', if(p='No', 'Ney!', 'What?')); END"); for (String connProps : new String[] { "getProceduresReturnsFunctions=false,useInformationSchema=false",