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