mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
Update mysql createindex bug
(cherry picked from commit a7a73fd94b)
# Conflicts:
# Src/Asp.Net/SqlSugar/Realization/MySql/DbMaintenance/MySqlDbMaintenance.cs
This commit is contained in:
@@ -333,7 +333,8 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual bool IsAnyIndex(string indexName)
|
||||
{
|
||||
string sql = string.Format(this.IsAnyIndexSql, indexName);
|
||||
//string sql = string.Format(this.IsAnyIndexSql, indexName);
|
||||
string sql = string.Format(this.IsAnyIndexSql, indexName, this.Context.Ado.Connection.Database);
|
||||
return this.Context.Ado.GetInt(sql)>0;
|
||||
}
|
||||
public virtual bool AddRemark(EntityInfo entity)
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace SqlSugar
|
||||
{
|
||||
get
|
||||
{
|
||||
return "SELECT count(*) FROM information_schema.statistics WHERE index_name = '{0}'";
|
||||
return "SELECT count(*) FROM information_schema.statistics WHERE index_name = '{0}' and index_schema = '{1}'";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user