File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,9 @@ public async Task BulkLoadLocalCsvFile()
132
132
[ Fact ]
133
133
public async Task BulkLoadCsvFileNotFound ( )
134
134
{
135
- var secureFilePath = m_database . Connection . Query < string > ( @"select @@global.secure_file_priv;" ) . FirstOrDefault ( ) ?? "" ;
135
+ var secureFilePath = await m_database . Connection . ExecuteScalarAsync < string > ( @"select @@global.secure_file_priv;" ) ;
136
+ if ( string . IsNullOrEmpty ( secureFilePath ) || secureFilePath == "NULL" )
137
+ return ;
136
138
137
139
MySqlBulkLoader bl = new MySqlBulkLoader ( m_database . Connection ) ;
138
140
bl . FileName = Path . Combine ( secureFilePath , AppConfig . MySqlBulkLoaderCsvFile + "-junk" ) ;
Original file line number Diff line number Diff line change @@ -134,7 +134,9 @@ public void BulkLoadLocalCsvFile()
134
134
[ Fact ]
135
135
public void BulkLoadCsvFileNotFound ( )
136
136
{
137
- var secureFilePath = m_database . Connection . Query < string > ( @"select @@global.secure_file_priv;" ) . FirstOrDefault ( ) ?? "" ;
137
+ var secureFilePath = m_database . Connection . ExecuteScalar < string > ( @"select @@global.secure_file_priv;" ) ;
138
+ if ( string . IsNullOrEmpty ( secureFilePath ) || secureFilePath == "NULL" )
139
+ return ;
138
140
139
141
MySqlBulkLoader bl = new MySqlBulkLoader ( m_database . Connection ) ;
140
142
bl . FileName = Path . Combine ( secureFilePath , AppConfig . MySqlBulkLoaderCsvFile + "-junk" ) ;
You can’t perform that action at this time.
0 commit comments