Skip to content

Commit

Permalink
Try using QUOTE function instead of replace hack
Browse files Browse the repository at this point in the history
  • Loading branch information
James A Sutherland committed Aug 29, 2022
1 parent 0570bb9 commit 0db0c40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
if: false
- name: Prep for MySQL bisection
if: false
run: |
export PATH=/usr/lib/ccache:$PATH
git clone https://github.com/mysql/mysql-server.git
Expand All @@ -53,20 +55,21 @@ jobs:
make -sj`nproc`
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: contains(github.ref,'refs/tags/')
if: false

- name: MySQL
run: |
sed -i'' -e 's|</TestDatabases>|<TestDatabase><DatabaseType>PostgreSql</DatabaseType><ConnectionString>User ID=postgres;Password=pgpass4291;Host=127.0.0.1;Port=5432</ConnectionString></TestDatabase></TestDatabases>|' Tests/FAnsiTests/TestDatabases.xml
sed -i'' -e 's/Pwd=;SslMode=None/Pwd=root;AllowPublicKeyRetrieval=true/' Tests/FAnsiTests/TestDatabases.xml
sudo systemctl start mysql.service
sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo sh -c "echo 'deb https://mirrors.xtom.com/mariadb/repo/10.9/ubuntu focal main' >>/etc/apt/sources.list"
sudo apt-get update
sudo apt-get install mariadb-server
sudo mysql -uroot <<EOM
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
EOM
#sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc'
#sudo sh -c "echo 'deb https://mirrors.xtom.com/mariadb/repo/10.9/ubuntu focal main' >>/etc/apt/sources.list"
#sudo apt-get update
#sudo apt-get install mariadb-server
#sudo mysql -uroot <<EOM
#ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
#EOM
- name: Test
if: contains(github.ref,'refs/tags/')
run: dotnet --logger "console;verbosity=minimal" --nologo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ order by
SELECT
GROUP_CONCAT(
CONCAT(
'{0}(case when {1} = \'', REPLACE(pivotValues.piv,'\'','\\\''), '\' then {2} else null end) AS `', pivotValues.piv,'`'
'{0}(case when {1} = ', QUOTE(pivotValues.piv), ' then {2} else null end) AS `', pivotValues.piv,'`'
)
) INTO @columnsSelectCases
FROM
Expand Down

0 comments on commit 0db0c40

Please sign in to comment.