Merge branch 'master' into master

This commit is contained in:
liumingmin 2018-09-06 10:58:39 +08:00 committed by GitHub
commit 42e18ebce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -551,9 +551,12 @@ func (db *mysql) CreateTableSql(table *core.Table, tableName, storeEngine, chars
if len(charset) == 0 { if len(charset) == 0 {
charset = db.URI().Charset charset = db.URI().Charset
} else if len(charset) > 0 { }
if len(charset) != 0 {
sql += " DEFAULT CHARSET " + charset sql += " DEFAULT CHARSET " + charset
} }
if db.rowFormat != "" { if db.rowFormat != "" {
sql += " ROW_FORMAT=" + db.rowFormat sql += " ROW_FORMAT=" + db.rowFormat

View File

@ -6,6 +6,7 @@ import (
"time" "time"
"github.com/go-xorm/xorm" "github.com/go-xorm/xorm"
_ "github.com/mattn/go-sqlite3"
) )
// User describes a user // User describes a user

View File

@ -77,6 +77,9 @@ func (session *Session) nocacheGet(beanKind reflect.Kind, table *core.Table, bea
defer rows.Close() defer rows.Close()
if !rows.Next() { if !rows.Next() {
if rows.Err() != nil {
return false, rows.Err()
}
return false, nil return false, nil
} }