Skip to content

Commit f2d1d13

Browse files
committed
Add patch for mysql_xdevapi
1 parent 3ee8e65 commit f2d1d13

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$file = "xmysqlnd\xmysqlnd_session.cc"
2+
$content = Get-Content -LiteralPath $file -Raw -Encoding utf8
3+
$content = $content -replace '(?ms)^([ \t]*)if\s*\(\s*FAIL\s*==\s*mysqlnd_error_info_init\(&error_info_impl,\s*persistent\)\s*\)\s*\{\s*\r?\n[ \t]*throw\s+std::runtime_error\("mysqlnd_error_info_init failed"\);\s*\r?\n\1\}', '$1mysqlnd_error_info_init(&error_info_impl, persistent);'
4+
Set-Content -LiteralPath $file -Value $content -Encoding utf8
5+
6+
$file = "xmysqlnd\xmysqlnd_protocol_frame_codec.cc"
7+
$content = Get-Content -LiteralPath $file -Raw -Encoding utf8
8+
$content = $content -replace 'DBG_INF_FMT\(\s*"count="\s*MYSQLND_SZ_T_SPEC\s*,\s*count\s*\)\s*;', 'DBG_INF_FMT("count=%zu", count);'
9+
Set-Content -LiteralPath $file -Value $content -Encoding utf8

0 commit comments

Comments
 (0)