You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using(varcmd=newMySqlCommand(""" drop table if exists test; create table test(`@a` int); insert into test values(1); """,conn))cmd.ExecuteNonQuery();varbulkCopy=newMySqlBulkCopy(conn){DestinationTableName="test",};vardataTable=newDataTable();dataTable.Columns.Add(newDataColumn(){DataType=typeof(int)});dataTable.Rows.Add(newobject[]{2});bulkCopy.WriteToServer(dataTable);using(varcmd=newMySqlCommand("select * from test;",conn))using(varreader=cmd.ExecuteReader()){while(reader.Read())Console.WriteLine($"{reader.IsDBNull(0)}{reader.GetValue(0)}");// second row is NULL}
The leading @ in the column name is detected as a variable; it should be quoted as an identifier instead.
The leading
@
in the column name is detected as a variable; it should be quoted as an identifier instead.Related to https://github.com/mysql-net/MySqlConnector/security/code-scanning/3.
The text was updated successfully, but these errors were encountered: