Re: [sqlite] core using sqlite 3.17.0 on solaris
Am 30.03.2017 um 19:22 schrieb Richard Hipp: > On 3/30/17, Scott Robisonwrote: >>> >> Also, isn't the new code potentially allocating a smaller buffer in >> zSpace? If sizeof(yyParser) is 15, the removed line would allocate a >> 15 element array of unsigned char objects for a total of 15 bytes. The >> added line would allocate a 15/8 = 1 element array of sqlite3_uint64 >> objects for a total of 8 bytes. >> > > The code that I actually checked in fixed that. > https://www.sqlite.org/src/artifact/d62a8f87?ln=486 Fix above works here. Thank you. Best regards, Marcel Hofstetter ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
On Thu, Mar 30, 2017 at 11:22 AM, Richard Hippwrote: > On 3/30/17, Scott Robison wrote: >>> >> Also, isn't the new code potentially allocating a smaller buffer in >> zSpace? If sizeof(yyParser) is 15, the removed line would allocate a >> 15 element array of unsigned char objects for a total of 15 bytes. The >> added line would allocate a 15/8 = 1 element array of sqlite3_uint64 >> objects for a total of 8 bytes. >> > > The code that I actually checked in fixed that. > https://www.sqlite.org/src/artifact/d62a8f87?ln=486 > > But that is an academic question now that the problem is fixed > properly, per Clemens' suggestion. > https://www.sqlite.org/src/artifact/de2ec4fe?ln=485 Right. I posted 60 seconds or so before your email hit my inbox. :) ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
On 3/30/17, Scott Robisonwrote: >> > Also, isn't the new code potentially allocating a smaller buffer in > zSpace? If sizeof(yyParser) is 15, the removed line would allocate a > 15 element array of unsigned char objects for a total of 15 bytes. The > added line would allocate a 15/8 = 1 element array of sqlite3_uint64 > objects for a total of 8 bytes. > The code that I actually checked in fixed that. https://www.sqlite.org/src/artifact/d62a8f87?ln=486 But that is an academic question now that the problem is fixed properly, per Clemens' suggestion. https://www.sqlite.org/src/artifact/de2ec4fe?ln=485 -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
On Thu, Mar 30, 2017 at 10:44 AM, Clemens Ladischwrote: > Richard Hipp wrote: >> #ifdef sqlite3Parser_ENGINEALWAYSONSTACK >> - unsigned char zSpace[sizeof(yyParser)]; /* Space for parser engine >> object */ >> + /* Space to hold the Lemon-generated Parser object */ >> + sqlite3_uint64 zSpace[sizeof(yyParser)/sizeof(sqlite_uint64)]; >> #endif > > The yyParser type is known at this place (otherwise, sizeof() would not > work). So why isn't a variable of this type defined directly? Also, isn't the new code potentially allocating a smaller buffer in zSpace? If sizeof(yyParser) is 15, the removed line would allocate a 15 element array of unsigned char objects for a total of 15 bytes. The added line would allocate a 15/8 = 1 element array of sqlite3_uint64 objects for a total of 8 bytes. -- Scott Robison ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
On 3/30/17, Clemens Ladischwrote: > Richard Hipp wrote: >> #ifdef sqlite3Parser_ENGINEALWAYSONSTACK >> - unsigned char zSpace[sizeof(yyParser)]; /* Space for parser engine >> object */ >> + /* Space to hold the Lemon-generated Parser object */ >> + sqlite3_uint64 zSpace[sizeof(yyParser)/sizeof(sqlite_uint64)]; >> #endif > > So why isn't a variable of this type defined directly? Lack of sense. Fixed now. Thanks. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
Richard Hipp wrote: > #ifdef sqlite3Parser_ENGINEALWAYSONSTACK > - unsigned char zSpace[sizeof(yyParser)]; /* Space for parser engine object > */ > + /* Space to hold the Lemon-generated Parser object */ > + sqlite3_uint64 zSpace[sizeof(yyParser)/sizeof(sqlite_uint64)]; > #endif The yyParser type is known at this place (otherwise, sizeof() would not work). So why isn't a variable of this type defined directly? Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] core using sqlite 3.17.0 on solaris
On 3/29/17, Marcel Hofstetterwrote: > > compiled 3.17.0 now. running on solaris 11. > > simple select on existing table cores > Please apply the patch below and let me know whether or not it helps: */ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ int nErr = 0; /* Number of errors encountered */ void *pEngine; /* The LEMON-generated LALR(1) parser */ int n = 0; /* Length of the next token token */ int tokenType; /* type of the next token */ int lastTokenParsed = -1; /* type of the previous token */ sqlite3 *db = pParse->db; /* The database connection */ int mxSqlLen; /* Max length of an SQL string */ #ifdef sqlite3Parser_ENGINEALWAYSONSTACK - unsigned char zSpace[sizeof(yyParser)]; /* Space for parser engine object */ + /* Space to hold the Lemon-generated Parser object */ + sqlite3_uint64 zSpace[sizeof(yyParser)/sizeof(sqlite_uint64)]; #endif assert( zSql!=0 ); mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH]; if( db->nVdbeActive==0 ){ db->u1.isInterrupted = 0; } pParse->rc = SQLITE_OK; pParse->zTail = zSql; assert( pzErrMsg!=0 ); -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users