mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-29 01:44:41 +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)
|
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;
|
return this.Context.Ado.GetInt(sql)>0;
|
||||||
}
|
}
|
||||||
public virtual bool AddRemark(EntityInfo entity)
|
public virtual bool AddRemark(EntityInfo entity)
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
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
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user