mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Rework the logic that generates a schema for tables created using
"CREATE TABLE ... AS SELECT ...". Instead of trying to copy the raw datatype string from the right-hand side, just make the type one of TEXT, INT, REAL, NUM, or nothing. This is much simpler than trying to parse and quote datatype strings. Other minor implifications to build.c are bundled with this change. (CVS 6626) FossilOrigin-Name: 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
** interface, and routines that contribute to loading the database schema
|
||||
** from disk.
|
||||
**
|
||||
** $Id: prepare.c,v 1.117 2009/04/20 17:43:03 drh Exp $
|
||||
** $Id: prepare.c,v 1.118 2009/05/11 20:53:29 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -258,7 +258,7 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
|
||||
if( iDb==0 ){
|
||||
/* If opening the main database, set ENC(db). */
|
||||
ENC(db) = (u8)meta[4];
|
||||
db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 6, 0);
|
||||
db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
|
||||
}else{
|
||||
/* If opening an attached database, the encoding much match ENC(db) */
|
||||
if( meta[4]!=ENC(db) ){
|
||||
|
||||
Reference in New Issue
Block a user