Commit 6bd0f5da authored by Alexander Barkov's avatar Alexander Barkov

Removing double new-line markers when doing LOAD_FILE('example.ini').

The libary to handle INI files on Windows XP adds an extra empty
line before sections name.

Newer versions of Windows do not.
Unix replacement implementation also do not.

modified:
  mysql-test/suite/connect/r/ini.result
  mysql-test/suite/connect/t/ini.test
parent d0f6e9a8
......@@ -40,9 +40,8 @@ SELECT * FROM t1 WHERE contact='UK2';
contact name forename hired address city zipcode tel
UK2 John 1970-01-01
DROP TABLE t1;
SELECT REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n');;
REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n')
SELECT REPLACE(REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n');;
REPLACE(REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n')
[BER]
name=Bertrand
forename=Olivier
......@@ -51,7 +50,6 @@ city=Issy-les-Mlx
zipcode=92130
tel=09.54.36.29.60
cell=06.70.06.04.16
[WEL]
name=Schmitt
forename=Bernard
......@@ -60,7 +58,6 @@ address=64 tiergarten strasse
city=Berlin
zipcode=95013
tel=03.43.377.360
[UK1]
name=Smith
forename=Harrison
......@@ -68,7 +65,6 @@ hired=08/11/2003
address=143 Blum Rd.
city=London
zipcode=NW1 2BP
[UK2]
forename=John
......@@ -104,9 +100,8 @@ UK1 city London
UK1 zipcode NW1 2BP
UK2 forename Paul
DROP TABLE t1;
SELECT REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n');;
REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n')
SELECT REPLACE(REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n');;
REPLACE(REPLACE(LOAD_FILE('DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n')
[BER]
name=Bertrand
forename=Olivier
......@@ -115,7 +110,6 @@ city=Issy-les-Mlx
zipcode=92130
tel=09.54.36.29.60
cell=06.70.06.04.16
[WEL]
name=Schmitt
forename=Bernard
......@@ -124,7 +118,6 @@ address=64 tiergarten strasse
city=Berlin
zipcode=95013
tel=03.43.377.360
[UK1]
name=Smith
forename=Harrison
......@@ -132,7 +125,6 @@ hired=08/11/2003
address=143 Blum Rd.
city=London
zipcode=NW1 2BP
[UK2]
forename=Paul
......@@ -153,21 +145,16 @@ contact c2
4000 4000
a b c d
DROP TABLE t1;
SELECT REPLACE(LOAD_FILE('DATADIR/test/tmp.ini'),'\r\n','\n');;
REPLACE(LOAD_FILE('DATADIR/test/tmp.ini'),'\r\n','\n')
SELECT REPLACE(REPLACE(LOAD_FILE('DATADIR/test/tmp.ini'),'\r\n','\n'),'\n\n','\n');;
REPLACE(REPLACE(LOAD_FILE('DATADIR/test/tmp.ini'),'\r\n','\n'),'\n\n','\n')
[10]
c2=10
[20]
c2=20
[300]
c2=300
[4000]
c2=4000
[a b]
c2=c d
......@@ -40,7 +40,7 @@ SELECT * FROM t1 WHERE contact='UK2';
DROP TABLE t1;
--chmod 0777 $MYSQLD_DATADIR/test/contact.ini
--replace_result $MYSQLD_DATADIR DATADIR
--eval SELECT REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/contact.ini'),'\r\n','\n');
--eval SELECT REPLACE(REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n');
CREATE TABLE t1
(
......@@ -54,7 +54,7 @@ SELECT * FROM t1;
DROP TABLE t1;
--chmod 0777 $MYSQLD_DATADIR/test/contact.ini
--replace_result $MYSQLD_DATADIR DATADIR
--eval SELECT REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/contact.ini'),'\r\n','\n');
--eval SELECT REPLACE(REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/contact.ini'),'\r\n','\n'),'\n\n','\n');
--echo #
......@@ -70,7 +70,7 @@ SELECT * FROM t1;
DROP TABLE t1;
--chmod 0777 $MYSQLD_DATADIR/test/tmp.ini
--replace_result $MYSQLD_DATADIR DATADIR
--eval SELECT REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/tmp.ini'),'\r\n','\n');
--eval SELECT REPLACE(REPLACE(LOAD_FILE('$MYSQLD_DATADIR/test/tmp.ini'),'\r\n','\n'),'\n\n','\n');
#
# Clean up
......
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