Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retores of procedures do not seem to work under Linux #56

Open
txs-lars opened this issue Dec 20, 2019 · 2 comments
Open

Retores of procedures do not seem to work under Linux #56

txs-lars opened this issue Dec 20, 2019 · 2 comments

Comments

@txs-lars
Copy link

txs-lars commented Dec 20, 2019

Retores of procedures do not seem to work under Linux due to the following bug in the Mysql connector:
https://bugs.mysql.com/bug.php?id=98037

If you try to restore this script under Linux a syntax exception occurs:

`-- MySqlBackup.NET 2.3.1
-- Dump Time: 2019-12-18 14:04:41


-- Server version 10.4.8-MariaDB-1:10.4.8+maria~bionic-log mariadb.org binary distribution

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/
!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/
!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/
!40101 SET NAMES utf8 /;
/
!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 /;
/
!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 /;
/
!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' /;
/
!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Dumping functions

DROP FUNCTION IF EXISTS TEST;
DELIMITER §§§
CREATE FUNCTION TEST() RETURNS int(11)
DETERMINISTIC
RETURN 8081; §§§
DELIMITER ;`

A quick workaround until Oracle solves the problem seems to make in line 1372 in the class MySqlBackup.cs in the method "Import_AppendLineAndExecute" no AppendLine but only an Append.

void Import_AppendLineAndExecute(string line) { _sbImport.Append(line); //if (!line.EndsWith(_delimiter)) // return;

The Mysql connector seems to have problems with the last line break (\n) under Linux.

@adriancs2
Copy link
Member

I'm changing AppendLine to Append.
thanks for sharing this info.

@adriancs2
Copy link
Member

Hi, new version of nuget is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants