Re: [sqlite] Yes, NULL is zero, is it?

2017-09-01 Thread Papa
Thanks everyone for your input. I am sorry, the error was cause by human error, i.e. my mistake :-P On 2017-08-31 9:43 PM, Papa wrote: This is not a SQLite3 problem, it shows to be a MinGW (mingw32/7.1.0/...)  -> Target: 64bit, however, I just wanted to know if anyone here has experience the

Re: [sqlite] Yes, NULL is zero, is it?

2017-09-01 Thread Dominique Devienne
On Fri, Sep 1, 2017 at 9:08 AM, Olivier Mascia wrote: > > The (calling program) bug starts here above. > sql_statement_request.data() is not guaranteed to be zero-terminated (and > generally isn't). > FWIW, it is since std C++11, i.e. .data() and .c_str() are equivalent going

Re: [sqlite] Yes, NULL is zero, is it?

2017-09-01 Thread Olivier Mascia
> Le 1 sept. 2017 à 03:43, Papa a écrit : > > std::string sql_statement_request; > ... > rc = sqlite3_prepare_v2(db, > sql_statement_request.data(), > -1, The (calling program) bug starts here above. sql_statement_request.data() is not

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Keith Medcalf
says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Cory Nelson >Sent: Thursday, 31 August, 2017 22:42 >To: SQLite mailing list >Subject: Re: [sqlite] Yes, NULL is zero

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Cory Nelson
On Thu, Aug 31, 2017 at 11:01 PM, Simon Slavin wrote: > > > On 1 Sep 2017, at 4:49am, J Decker wrote: > >> That and MinGW defines NULL as 0 if C++ and not void(*) > > Oh Gawd, the old C/C++ problem. > > Some compilers and IDEs, by default, compile ".c"

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Igor Tandetnik
On 8/31/2017 11:49 PM, J Decker wrote: That and MinGW defines NULL as 0 if C++ and not void(*) I don't see how this is relevant. The OP isn't doing cout << NULL , they are doing cout << binary_sql_statement , where binary_sql_statement is presumably a sqlite_statement* - definitely a

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Simon Slavin
On 1 Sep 2017, at 4:49am, J Decker wrote: > That and MinGW defines NULL as 0 if C++ and not void(*) Oh Gawd, the old C/C++ problem. Some compilers and IDEs, by default, compile ".c" files as if they are C++. This leads to all sorts of weird behaviour including both

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread J Decker
> >boun...@mailinglists.sqlite.org] On Behalf Of Igor Tandetnik > >Sent: Thursday, 31 August, 2017 20:32 > >To: sqlite-users@mailinglists.sqlite.org > >Subject: Re: [sqlite] Yes, NULL is zero, is it? > > > >On 8/31/2017 10:20 PM, Keith Medcalf wrote: >

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Keith Medcalf
f Of Igor Tandetnik >Sent: Thursday, 31 August, 2017 20:32 >To: sqlite-users@mailinglists.sqlite.org >Subject: Re: [sqlite] Yes, NULL is zero, is it? > >On 8/31/2017 10:20 PM, Keith Medcalf wrote: >> Why do you think that a pointer to an arbitrary data block can be >sent

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Igor Tandetnik
On 8/31/2017 10:20 PM, Keith Medcalf wrote: Why do you think that a pointer to an arbitrary data block can be sent to cout? Because cout provides operator<<(void*) -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Keith Medcalf
nal Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Papa >Sent: Thursday, 31 August, 2017 19:43 >To: SQLite Mailing List >Subject: [sqlite] Yes, NULL is zero, is it? > >This is not a SQLite3 problem, it shows to be

Re: [sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Igor Tandetnik
On 8/31/2017 9:43 PM, Papa wrote: This is not a SQLite3 problem, it shows to be a MinGW (mingw32/7.1.0/...)  -> Target: 64bit, however, I just wanted to know if anyone here has experience the same problem.     std::string sql_statement_request;     ...     rc = sqlite3_prepare_v2(db,  

[sqlite] Yes, NULL is zero, is it?

2017-08-31 Thread Papa
This is not a SQLite3 problem, it shows to be a MinGW (mingw32/7.1.0/...)  -> Target: 64bit, however, I just wanted to know if anyone here has experience the same problem.     std::string sql_statement_request;     ...     rc = sqlite3_prepare_v2(db,     sql_statement_request.data(),