Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Jens Alfke
Apple's darwin-dev mailing list, hosted at lists.apple.com 
, might be a good place to ask about this. 
(I'm subscribed to it, so I could forward a question if the OP doesn't want to 
go to the bother of subscribing.)

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Simon Slavin

On 11 Apr 2017, at 4:06pm, Richard Hipp  wrote:

> SQLITE_IOERR_VNODE is an error code used by proprietary modifications
> to SQLite implemented by Apple for use on MacOS and iOS.  I am told
> "The code indicates that a file relevant to the call was invalidated
> by a dispatch vnode source event" but I do not understand what that
> means.

I’m not surprised.  That’s not a useful explanation for anyone who isn’t 
messing with the OS X Virtual File System.  I’m a Mac expert and I have only 
the vaguest clue.  I think Apple is trying to implement memory-mapped file 
handling for SQLite in a very direct and efficient manner, and a strange 
combination of circumstances is triggering an error.

We're used to inodes in file storage.  Apple uses vnodes as well as inodes.  
They’re for storing a file’s metadata, like the file’s name and the last time 
the file was accessed.  If you change metadata VFS might decide to overwrite 
the contents of the existing vnode, or it might write the new data to a new 
vnode, then switch the file’s pointer to the new one and dispose of the old one.

What I think you’re being told is that you’re referring to a file, VFS is 
remembering the reference by pointing to the vnode, but that the file now has a 
new vnode because it has new metadata.  I have no clue why that might happen.  
vnodes are meant to be for internal use only.  If you’re not intentionally 
messing with them, you shouldn’t be getting vnode errors.

The nearest I can find is Working With the File System from



and then



There is one common use for vnodes: memory-mapped files.  The vnode pager 
maintains the relationship between the memory copy of a page of a file and the 
disk copy of the same page of the file.  So perhaps that piece of code is 
intentionally messing with memory-mapped file access.  Again, there’s no good 
reason for you to be getting errors with vnodes unless you’re messing at kernel 
level.

ObDisc: I am not familiar with this stuff.  I don’t program Macs at kernel 
level and don’t understand how it all works.  I’m just remembering stuff I read 
somewhere, possibly now obsolete.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Richard Hipp
On 4/11/17, Yf Shen  wrote:
> We have an application that connects to a small SQLite database in
> read-only mode and do some very simple SELECT queries.
>
> We recently upgraded Mac OS to 10.12, and the application started to
> sporadically fail with a general (useless) error code SQLITE_IOERR. We
> managed to get the extended error code SQLITE_IOERR_VNODE (6922), but could
> not find any documentation about it or find where it is used in the source
> code of SQLite except that we found where it was defined. Google knows
> nothing about this error either probably because it is brand new. Can
> someone shed some light?

SQLITE_IOERR_VNODE is an error code used by proprietary modifications
to SQLite implemented by Apple for use on MacOS and iOS.  I am told
"The code indicates that a file relevant to the call was invalidated
by a dispatch vnode source event" but I do not understand what that
means.

-- 
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


[sqlite] What does SQLITE_IOERR_VNODE mean?

2017-04-11 Thread Yf Shen
We have an application that connects to a small SQLite database in
read-only mode and do some very simple SELECT queries.

We recently upgraded Mac OS to 10.12, and the application started to
sporadically fail with a general (useless) error code SQLITE_IOERR. We
managed to get the extended error code SQLITE_IOERR_VNODE (6922), but could
not find any documentation about it or find where it is used in the source
code of SQLite except that we found where it was defined. Google knows
nothing about this error either probably because it is brand new. Can
someone shed some light?

Thanks,
Yufei
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does SQLITE_OS_WINRT mean

2014-03-12 Thread Joe Mistachkin

>
> What does the macro SQLITE_OS_WINRT mean? 
>

When it is set to non-zero, it means that the SQLite core library is being
built specifically for the Windows Runtime (present on Windows 8.x):

https://en.wikipedia.org/wiki/Windows_Runtime

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] What does SQLITE_OS_WINRT mean

2014-03-12 Thread 张一帆
What does the macro SQLITE_OS_WINRT mean? Just for windows runtime
including win95 ,win98 and WinNT?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] What does SQLITE_IOERR_TRUNCATE mean, exactly?

2009-08-17 Thread John Belli
I have a broken database file, with a journal. It is opened read-only
(via sqlite3_open_v2()). The statement "PRAGMA user version" is
prepared successfully. When sqlite3_step() is called, the return code
is SQLITE_IOERR. The extended code is SQLITE_IOERR_TRUNCATE. What
exactly does this mean?


JAB
-- 
John A. Belli
Software Engineer
Refrigerated Transport Electronics, Inc.
http://www.rtelectronics.com

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


RE: [sqlite] What does this mean???

2007-02-08 Thread prabhu kumaravelu





From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: <sqlite-users@sqlite.org>
Subject: [sqlite] What does this mean???
Date: Wed, 7 Feb 2007 17:33:21 -0500

not an error(21) at dbdimp.c line 398

I'm using DBD::SQLite and got this error. What does it mean and how best
to hanle it?

Thanks,

jim


NOTICE: If received in error, please destroy and notify sender. Sender does 
not intend to waive confidentiality or privilege. Use of this email is 
prohibited when received in error.


_
Latest updates from the world of sports 
http://content.msn.co.in/Sports/Default



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] What does this mean???

2007-02-08 Thread Clark Christensen
WOW.  Good to know.  Thanks Jim (and Matt).

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: Matt Sergeant <[EMAIL PROTECTED]>
Cc: sqlite-users@sqlite.org
Sent: Thursday, February 8, 2007 8:36:31 AM
Subject: RE: [sqlite] What does this mean???

Looks like removing the semi-colon did the trick. Thanks very much. 

-Original Message-
From: Matt Sergeant [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 08, 2007 11:09 AM
To: Anderson, James H (IT)
Cc: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 8-Feb-07, at 11:04 AM, Anderson, James H ((IT)) wrote:

> The output after setting $dbh->trace(3):

Ah. Please re-try after taking the semi-colon off the end of your SQL.


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] What does this mean???

2007-02-08 Thread Anderson, James H \(IT\)
Looks like removing the semi-colon did the trick. Thanks very much. 

-Original Message-
From: Matt Sergeant [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 08, 2007 11:09 AM
To: Anderson, James H (IT)
Cc: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 8-Feb-07, at 11:04 AM, Anderson, James H ((IT)) wrote:

> The output after setting $dbh->trace(3):

Ah. Please re-try after taking the semi-colon off the end of your SQL.


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] What does this mean???

2007-02-08 Thread Anderson, James H \(IT\)
The output after setting $dbh->trace(3):

insert or replace into TMP_credDerivOrig
select
A.date,
A.CDId,
A.CDName,
A.CDTicket,
A.tradeId,
A.tapsAccount,
A.CDBook,
coalesce(A.CDFid,'') CDFid,
A.CDStatus,
A.CDTradeDate,
A.CDExpDate,
A.CDNotional,
A.CDCurr,
A.CDSellBuy,
A.CDType,
A.CDExerType,
A.CDEntity,
A.CDCusip,
A.CDSetlType,
A.CDCredInit,
A.CDSingleEntry,
A.CDMaterialType,
A.CDEffDate,
A.CDPremFreq,
A.CDPaymentType,
A.CDUpfrontSetl,
A.CDPublicInfo,
A.CDCollReq,
A.CDSpreadCurve,
A.CDPremium,
A.CDOptType,
A.CDAccrue,
A.CDRefPrice,
A.CDPremiumAmnt,
A.CDLastCoupLength,
A.CDWhoDelivers,
A.CDCollateralText,
A.CDFactorReason,
A.CDDefStartProt,
A.CDDefEndProt,
A.CDDefProtType,
B.CDComment,
A.CDEvent,
A.CDCurveType,
A.CrvShName,
A.CDRefEntity,
A.CDRefIndustry,
A.CDRefCountry,
A.CDRefSNP,
A.CDRefMoody,
A.CDRefMSRating,
A.CDRefId
  from TMP_credDerivOrig   A,
   C1_credDerivComment B
 where A.CDId = B.CDId;
-> prepare for DBD::SQLite::db (DBI::db=HASH(0x8159970)~0x8389c6c '

insert or replace into TMP_credDerivOrig
select
A.date,
A.CDId,
A.CDName,
A.CDTicket,
A.tradeId,
A.tapsAccount,
A.CDBook,
coalesce(A.CDFid,'') CDFid,
A.CDStatus,
A.CDTradeDate,
A.CDExpDate,
A.CDNotional,
A.CDCurr,
A.CDSellBuy,
A.CDType,
A.CDExerType,
A.CDEntity,
A.CDCusip,
A.CDSetlType,
A.CDCredInit,
A.CDSingleEntry,
A.CDMaterialType,
A.CDEffDate,
A.CDPremFreq,
A.CDPaymentType,
A.CDUpfrontS...') thr#813b008
dbih_setup_handle(DBI::st=HASH(0x8390cb8)=>DBI::st=HASH(0x8389d8c),
DBD::SQLite::st, 8390c88, Null!)
dbih_make_com(DBI::db=HASH(0x8389c6c), 838a0b8, DBD::SQLite::st,
124, 0) thr#813b008
sqlite trace: prepare statement: 

insert or replace into TMP_credDerivOrig
select
A.date,
A.CDId,
A.CDName,
A.CDTicket,
A.tradeId,
A.tapsAccount,
A.CDBook,
coalesce(A.CDFid,'') CDFid,
A.CDStatus,
A.CDTradeDate,
A.CDExpDate,
A.CDNotional,
A.CDCurr,
A.CDSellBuy,
A.CDType,
A.CDExerType,
A.CDEntity,
A.CDCusip,
A.CDSetlType,
A.CDCredInit,
A.CDSingleEntry,
A.CDMaterialType,
A.CDEffDate,
A.CDPremFreq,
A.CDPaymentType,
A.CDUpfrontSetl,
A.CDPublicInfo,
A.CDCollReq,
A.CDSpreadCurve,
A.CDPremium,
A.CDOptType,
A.CDAccrue,
A.CDRefPrice,
A.CDPremiumAmnt,
A.CDLastCoupLength,
A.CDWhoDelivers,
A.CDCollateralText,
A.CDFactorReason,
A.CDDefStartProt,
A.CDDefEndProt,
A.CDDefProtType,
B.CDComment,
A.CDEvent,
A.CDCurveType,
A.CrvShName,
A.CDRefEntity,
A.CDRefIndustry,
A.CDRefCountry,
A.CDRefSNP,
A.CDRefMoody,
A.CDRefMSRating,
A.CDRefId
  from TMP_credDerivOrig   A,
   C1_credDerivComment B
 where A.CDId = B.CDId; at dbdimp.c line 258
<- prepare= DBI::st=HASH(0x8390cb8) at DBUtilLite.pm line 185 via
at DBUtilLite.pm line 185
-> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x8390b80)~INNER)
thr#813b008
<- DESTROY= undef at DBUtilLite.pm line 186 via  at DBUtilLite.pm
line 186
-> execute for DBD::SQLite::st (DBI::st=HASH(0x8390cb8)~0x8389d8c)
thr#813b008
sqlite trace: Execute returned 0 cols
 at dbdimp.c line 391
<- execute= 566606 at DBUtilLite.pm line 187 via  at DBUtilLite.pm
line 187
-> rows for DBD::SQLite::st (DBI::st=HASH(0x8390cb8)~0x8389d8c)
thr#813b008
<- rows= 566606 at DBUtilLite.pm line 189 via  at test.pl line 29
rows affected: 566606

-> prepare for DBD::SQLite::db (DBI::db=HASH(0x8159970)~0x8389c6c '
') thr#813b008
dbih_setup_handle(DBI::st=HASH(0x8390cc4)=>DBI::st=HASH(0x8390a6c),
DBD::SQLite::st, 8390ca0, Null!)
dbih_make_com(DBI::db=HASH(0x8389c6c), 838a0b8, DBD::SQLite::st,
124, 0) thr#813b008
sqlite trace: prepare statement: 
 at dbdimp.c line 258
<- prepare= DBI::st=HASH(0x8390cc4) at DBUtilLite.pm line 185 via
at DBUtilLite.pm line 185
-> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x8389d8c)~INNER)
thr#813b008
<- DESTROY= undef at DBUtilLite.pm line 186 via  at DBUtilLite.pm
line 186
-> execute for DBD::SQLite::st (DBI::st=HASH(0x8390cc4)~0x8390a6c)
thr#813b008
sqlite trace: Execute returned 0 cols
 at dbdimp.c line 391
sqlite error 21 recorded: not an error at dbdimp.c line 398
!! ERROR: 21 'not an error(21) at dbdimp.c line 398' (err#0)
<- execute= undef at DBUtilLite.pm line 187 via  at DBUtilLite.pm
line 187
1   -> FETCH for DBD::SQLite::st (DBI::st=HASH(0x8390a6c)~INNER
'ParamValues') thr#813b008
.. FETCH DBI::st=HASH(0x8390a6c) 'ParamValues' = undef
   ERROR: 21 'not an error(21) at dbdimp.c line 398' (err#0)
1   <- FETCH= undef at DBUtilLite.pm line 187 via  at DBUtilLite.pm line
187
DBD::SQLite::st execute failed: not an error(21) at dbdimp.c line 398
[for Statement "
"] at /u/crdceed/lib/perl5/DBUtilLite.pm line 187.
DBD::SQLite::st execute failed: not an error(21) at dbdimp.c line 398
[for Statement "
"] at /u/crdceed/lib/perl5/DBUtilLite.pm line 187.
-> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x8390a6c)~INNER)
thr#813b008
   ERROR: 21 'not an error(21) at dbdimp.c line 398' (err#0)
<- DESTROY= undef
-> DESTROY for DBD::SQLite::db (DBI::db=HASH(0x8389c6c)~INNER)
thr#813b008
   ERROR: 21 'not an error(21) at dbdimp.c line 398' (err#0)
<- 

RE: [sqlite] What does this mean???

2007-02-08 Thread Anderson, James H \(IT\)
I get the exact same failure after making the suggested changes.

DBD::SQLite::st execute failed: not an error(21) at dbdimp.c line 398
[for Statement "
"] at /u/crdceed/lib/perl5/DBUtilLite.pm line 185.
DBD::SQLite::st execute failed: not an error(21) at dbdimp.c line 398
[for Statement "
"] at /u/crdceed/lib/perl5/DBUtilLite.pm line 185.

-Original Message-
From: Clark Christensen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 7:30 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

Jim,

Line 398 in dbdimp.c appears to be in DBD-SQLite's $sth->execute code.

I agree with Puneet.  If you wrap your DBI calls in eval blocks and test
$@, you might get more info about the error (or maybe not).  Also,
setting RaiseError, and ShowErrorStatement in $dbh wouldn't hurt.

$dbh = DBI->connect("dbi:SQLite:dbname=$dbname","","",
{RaiseError=>1, ShowErrorStatement=>1});
$sql = "insert or replace into...";
eval { $sth = $dbh->prepare( $sql ) };
die $@ if ($@);
eval { $sth->execute };
die $@ if ($@);


Not sure if any of that helps at all.  "not an error" on $sth->execute
is bound to be nasty to diagnose.  FWIW, it looks like "not an error" is
the result of a call to sqlite3_errmsg().

Unrelated to your issue is a DBI presentation you may be interested to
look through at
http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/index.htm

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 3:28:00 PM
Subject: RE: [sqlite] What does this mean???

Yes, I printed out the errstr. That was what I sent in the original
mail.

$sth = $dbh->prepare( $sql ) or die $dbh->errstr;
$sth->executeor die $dbh->errstr;

which produced:

not an error(21) at dbdimp.c line 398

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 6:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> Context :)
>
> insert or replace into TMP_credDerivOrig
> select
> A.date,
..
> A.CDRefId
>   from TMP_credDerivOrig   A,
>C1_credDerivComment B
>  where A.CDId = B.CDId;


yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
> Kishor
> Sent: Wednesday, February 07, 2007 5:39 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] What does this mean???
>
> On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
> wrote:
> > not an error(21) at dbdimp.c line 398
> >
> > I'm using DBD::SQLite and got this error. What does it mean and how
> best
> > to hanle it?
> >
>
>
> well, how about some context? What is the structure of the table(s)
> you are querying, what is the query, the relevant code snippet,
> something to go on?
>
> The error string itself means that you did something via Perl that
> violated whatever it was at line 398 of the c program dbdimp.c.
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation http://www.osgeo.org/education/
> -
> collaborate, communicate, compete
> =
>
>

> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>

> -
> 
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/educa

RE: [sqlite] What does this mean???

2007-02-08 Thread Anderson, James H \(IT\)
Found the following in sqlite.h.in. This indicates to me that DBD-SQLite
isn't handling this "error" string correctly.

/*
** Return the error code for the most recent sqlite3_* API call
associated
** with sqlite3 handle 'db'. SQLITE_OK is returned if the most recent 
** API call was successful.
**
** Calls to many sqlite3_* functions set the error code and string
returned
** by sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16()
** (overwriting the previous values). Note that calls to
sqlite3_errcode(),
** sqlite3_errmsg() and sqlite3_errmsg16() themselves do not affect the
** results of future invocations.
**
** Assuming no other intervening sqlite3_* API calls are made, the error
** code returned by this function is associated with the same error as
** the strings  returned by sqlite3_errmsg() and sqlite3_errmsg16().
*/
int sqlite3_errcode(sqlite3 *db);

/*
** Return a pointer to a UTF-8 encoded string describing in english the
** error condition for the most recent sqlite3_* API call. The returned
** string is always terminated by an 0x00 byte.
**
** The string "not an error" is returned when the most recent API call
was
** successful.
*/
const char *sqlite3_errmsg(sqlite3*);

/*
** Return a pointer to a UTF-16 native byte order encoded string
describing
** in english the error condition for the most recent sqlite3_* API
call.
** The returned string is always terminated by a pair of 0x00 bytes.
**
** The string "not an error" is returned when the most recent API call
was
** successful.
*/
const void *sqlite3_errmsg16(sqlite3*); 

-Original Message-
From: Clark Christensen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 7:30 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

Jim,

Line 398 in dbdimp.c appears to be in DBD-SQLite's $sth->execute code.

I agree with Puneet.  If you wrap your DBI calls in eval blocks and test
$@, you might get more info about the error (or maybe not).  Also,
setting RaiseError, and ShowErrorStatement in $dbh wouldn't hurt.

$dbh = DBI->connect("dbi:SQLite:dbname=$dbname","","",
{RaiseError=>1, ShowErrorStatement=>1});
$sql = "insert or replace into...";
eval { $sth = $dbh->prepare( $sql ) };
die $@ if ($@);
eval { $sth->execute };
die $@ if ($@);


Not sure if any of that helps at all.  "not an error" on $sth->execute
is bound to be nasty to diagnose.  FWIW, it looks like "not an error" is
the result of a call to sqlite3_errmsg().

Unrelated to your issue is a DBI presentation you may be interested to
look through at
http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/index.htm

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 3:28:00 PM
Subject: RE: [sqlite] What does this mean???

Yes, I printed out the errstr. That was what I sent in the original
mail.

$sth = $dbh->prepare( $sql ) or die $dbh->errstr;
$sth->executeor die $dbh->errstr;

which produced:

not an error(21) at dbdimp.c line 398

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 6:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> Context :)
>
> insert or replace into TMP_credDerivOrig
> select
> A.date,
..
> A.CDRefId
>   from TMP_credDerivOrig   A,
>C1_credDerivComment B
>  where A.CDId = B.CDId;


yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
> Kishor
> Sent: Wednesday, February 07, 2007 5:39 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] What does this mean???
>
> On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
> wrote:
> > not an error(21) at dbdimp.c line 398
> >
> > I'm using DBD::SQLite and got this error. What does it mean and how
> best
> > to hanle it?
> >
>
>
> well, how about some context? What is the structure of the table(s)
> you are querying, what is the query, the relevant code snippet,
> something to go on?
>
> The error string itself means that you did something via Perl t

RE: [sqlite] What does this mean???

2007-02-08 Thread Anderson, James H \(IT\)
Thanks, Clark. I'll give that a try.

jim 

-Original Message-
From: Clark Christensen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 7:30 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

Jim,

Line 398 in dbdimp.c appears to be in DBD-SQLite's $sth->execute code.

I agree with Puneet.  If you wrap your DBI calls in eval blocks and test
$@, you might get more info about the error (or maybe not).  Also,
setting RaiseError, and ShowErrorStatement in $dbh wouldn't hurt.

$dbh = DBI->connect("dbi:SQLite:dbname=$dbname","","",
{RaiseError=>1, ShowErrorStatement=>1});
$sql = "insert or replace into...";
eval { $sth = $dbh->prepare( $sql ) };
die $@ if ($@);
eval { $sth->execute };
die $@ if ($@);


Not sure if any of that helps at all.  "not an error" on $sth->execute
is bound to be nasty to diagnose.  FWIW, it looks like "not an error" is
the result of a call to sqlite3_errmsg().

Unrelated to your issue is a DBI presentation you may be interested to
look through at
http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/index.htm

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 3:28:00 PM
Subject: RE: [sqlite] What does this mean???

Yes, I printed out the errstr. That was what I sent in the original
mail.

$sth = $dbh->prepare( $sql ) or die $dbh->errstr;
$sth->executeor die $dbh->errstr;

which produced:

not an error(21) at dbdimp.c line 398

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 6:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> Context :)
>
> insert or replace into TMP_credDerivOrig
> select
> A.date,
..
> A.CDRefId
>   from TMP_credDerivOrig   A,
>C1_credDerivComment B
>  where A.CDId = B.CDId;


yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
> Kishor
> Sent: Wednesday, February 07, 2007 5:39 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] What does this mean???
>
> On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
> wrote:
> > not an error(21) at dbdimp.c line 398
> >
> > I'm using DBD::SQLite and got this error. What does it mean and how
> best
> > to hanle it?
> >
>
>
> well, how about some context? What is the structure of the table(s)
> you are querying, what is the query, the relevant code snippet,
> something to go on?
>
> The error string itself means that you did something via Perl that
> violated whatever it was at line 398 of the c program dbdimp.c.
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation http://www.osgeo.org/education/
> -
> collaborate, communicate, compete
> =
>
>

> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>

> -
> 
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NO

Re: [sqlite] What does this mean???

2007-02-07 Thread Clark Christensen
Jim,

Line 398 in dbdimp.c appears to be in DBD-SQLite's $sth->execute code.

I agree with Puneet.  If you wrap your DBI calls in eval blocks and test $@, 
you might get more info about the error (or maybe not).  Also, setting 
RaiseError, and ShowErrorStatement in $dbh wouldn't hurt.

$dbh = DBI->connect("dbi:SQLite:dbname=$dbname","","", {RaiseError=>1, 
ShowErrorStatement=>1});
$sql = "insert or replace into...";
eval { $sth = $dbh->prepare( $sql ) };
die $@ if ($@);
eval { $sth->execute };
die $@ if ($@);


Not sure if any of that helps at all.  "not an error" on $sth->execute is bound 
to be nasty to diagnose.  FWIW, it looks like "not an error" is the result of a 
call to sqlite3_errmsg().

Unrelated to your issue is a DBI presentation you may be interested to look 
through at http://search.cpan.org/src/TIMB/DBI_AdvancedTalk_2004/index.htm

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 3:28:00 PM
Subject: RE: [sqlite] What does this mean???

Yes, I printed out the errstr. That was what I sent in the original
mail.

$sth = $dbh->prepare( $sql ) or die $dbh->errstr;
$sth->executeor die $dbh->errstr;

which produced:

not an error(21) at dbdimp.c line 398

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 6:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> Context :)
>
> insert or replace into TMP_credDerivOrig
> select
> A.date,
..
> A.CDRefId
>   from TMP_credDerivOrig   A,
>C1_credDerivComment B
>  where A.CDId = B.CDId;


yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
> Kishor
> Sent: Wednesday, February 07, 2007 5:39 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] What does this mean???
>
> On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
> wrote:
> > not an error(21) at dbdimp.c line 398
> >
> > I'm using DBD::SQLite and got this error. What does it mean and how
> best
> > to hanle it?
> >
>
>
> well, how about some context? What is the structure of the table(s)
> you are querying, what is the query, the relevant code snippet,
> something to go on?
>
> The error string itself means that you did something via Perl that
> violated whatever it was at line 398 of the c program dbdimp.c.
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation http://www.osgeo.org/education/
> -
> collaborate, communicate, compete
> =
>
>

> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>

> -
> 
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
Yes, I printed out the errstr. That was what I sent in the original
mail.

$sth = $dbh->prepare( $sql ) or die $dbh->errstr;
$sth->executeor die $dbh->errstr;

which produced:

not an error(21) at dbdimp.c line 398

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 6:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> Context :)
>
> insert or replace into TMP_credDerivOrig
> select
> A.date,
..
> A.CDRefId
>   from TMP_credDerivOrig   A,
>C1_credDerivComment B
>  where A.CDId = B.CDId;


yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
> Kishor
> Sent: Wednesday, February 07, 2007 5:39 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] What does this mean???
>
> On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
> wrote:
> > not an error(21) at dbdimp.c line 398
> >
> > I'm using DBD::SQLite and got this error. What does it mean and how
> best
> > to hanle it?
> >
>
>
> well, how about some context? What is the structure of the table(s)
> you are querying, what is the query, the relevant code snippet,
> something to go on?
>
> The error string itself means that you did something via Perl that
> violated whatever it was at line 398 of the c program dbdimp.c.
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation http://www.osgeo.org/education/
> -
> collaborate, communicate, compete
> =
>
>

> -
> To unsubscribe, send email to [EMAIL PROTECTED]
>

> -
> 
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
sqlite-version: 3.3.5
DBD-SQLite: 1.12

-Original Message-
From: Clark Christensen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 07, 2007 6:15 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

What version of SQLite, and what version of DBD-SQLite?

I saw this predictably with DBD-SQLite 1.09 and SQLite 3.2.7 where I did
something like:

$sth = $dbh->prepare("select foo, bar from mytable where rowid =
?");
for $i (1..5)  {
($myfoo, $mybar) = $dbh->selectrow_array($sth, undef, $i);
}

It would work for the first iteration, then raise a "not an error" error
on the second.  It was annoying, but I usually just worked around it
using $sth->execute/bind_columns/fetch inside the loop.

I updated to DBD-SQLite 1.13 with SQLite 3.3.12, and it worked like it's
documented for DBI (fixed the problem).

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 2:33:21 PM
Subject: [sqlite] What does this mean???

not an error(21) at dbdimp.c line 398

I'm using DBD::SQLite and got this error. What does it mean and how best
to hanle it?

Thanks,

jim


NOTICE: If received in error, please destroy and notify sender. Sender
does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.





-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] What does this mean???

2007-02-07 Thread P Kishor

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote:

Context :)

insert or replace into TMP_credDerivOrig
select
A.date,

..

A.CDRefId
  from TMP_credDerivOrig   A,
   C1_credDerivComment B
 where A.CDId = B.CDId;



yes, but you want to know why an error is appearing, so you have to
show the code that is causing the error. The above is just the SQL
statement. How on earth can one decipher whether or not you have some
error in your code from that.

Did you print out the DBI err str? Did you wrap it in an eval and then
print out the reason it died? That would really help find the cause of
the error.

Else, you can always open up dbdimp.c and look at line 398. That
should set you in the right direction.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 5:39 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> not an error(21) at dbdimp.c line 398
>
> I'm using DBD::SQLite and got this error. What does it mean and how
best
> to hanle it?
>


well, how about some context? What is the structure of the table(s)
you are querying, what is the query, the relevant code snippet,
something to go on?

The error string itself means that you did something via Perl that
violated whatever it was at line 398 of the c program dbdimp.c.

--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.




--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] What does this mean???

2007-02-07 Thread Clark Christensen
What version of SQLite, and what version of DBD-SQLite?

I saw this predictably with DBD-SQLite 1.09 and SQLite 3.2.7 where I did 
something like:

$sth = $dbh->prepare("select foo, bar from mytable where rowid = ?");
for $i (1..5)  {
($myfoo, $mybar) = $dbh->selectrow_array($sth, undef, $i);
}

It would work for the first iteration, then raise a "not an error" error on the 
second.  It was annoying, but I usually just worked around it using 
$sth->execute/bind_columns/fetch inside the loop.

I updated to DBD-SQLite 1.13 with SQLite 3.3.12, and it worked like it's 
documented for DBI (fixed the problem).

 -Clark

- Original Message 
From: "Anderson, James H (IT)" <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, February 7, 2007 2:33:21 PM
Subject: [sqlite] What does this mean???

not an error(21) at dbdimp.c line 398

I'm using DBD::SQLite and got this error. What does it mean and how best
to hanle it?

Thanks,

jim


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
Context :)

insert or replace into TMP_credDerivOrig
select
A.date,
A.CDId,
A.CDName,
A.CDTicket,
A.tradeId,
A.tapsAccount,
A.CDBook,
coalesce(A.CDFid,'') CDFid,
A.CDStatus,
A.CDTradeDate,
A.CDExpDate,
A.CDNotional,
A.CDCurr,
A.CDSellBuy,
A.CDType,
A.CDExerType,
A.CDEntity,
A.CDCusip,
A.CDSetlType,
A.CDCredInit,
A.CDSingleEntry,
A.CDMaterialType,
A.CDEffDate,
A.CDPremFreq,
A.CDPaymentType,
A.CDUpfrontSetl,
A.CDPublicInfo,
A.CDCollReq,
A.CDSpreadCurve,
A.CDPremium,
A.CDOptType,
A.CDAccrue,
A.CDRefPrice,
A.CDPremiumAmnt,
A.CDLastCoupLength,
A.CDWhoDelivers,
A.CDCollateralText,
A.CDFactorReason,
A.CDDefStartProt,
A.CDDefEndProt,
A.CDDefProtType,
B.CDComment,
A.CDEvent,
A.CDCurveType,
A.CrvShName,
A.CDRefEntity,
A.CDRefIndustry,
A.CDRefCountry,
A.CDRefSNP,
A.CDRefMoody,
A.CDRefMSRating,
A.CDRefId
  from TMP_credDerivOrig   A,
   C1_credDerivComment B
 where A.CDId = B.CDId;
rows affected: 566606 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P
Kishor
Sent: Wednesday, February 07, 2007 5:39 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What does this mean???

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]>
wrote:
> not an error(21) at dbdimp.c line 398
>
> I'm using DBD::SQLite and got this error. What does it mean and how
best
> to hanle it?
>


well, how about some context? What is the structure of the table(s)
you are querying, what is the query, the relevant code snippet,
something to go on?

The error string itself means that you did something via Perl that
violated whatever it was at line 398 of the c program dbdimp.c.

-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=


-
To unsubscribe, send email to [EMAIL PROTECTED]

-


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.


Re: [sqlite] What does this mean???

2007-02-07 Thread P Kishor

On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote:

not an error(21) at dbdimp.c line 398

I'm using DBD::SQLite and got this error. What does it mean and how best
to hanle it?




well, how about some context? What is the structure of the table(s)
you are querying, what is the query, the relevant code snippet,
something to go on?

The error string itself means that you did something via Perl that
violated whatever it was at line 398 of the c program dbdimp.c.

--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/
Open Source Geospatial Foundation http://www.osgeo.org/education/
-
collaborate, communicate, compete
=

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
not an error(21) at dbdimp.c line 398

I'm using DBD::SQLite and got this error. What does it mean and how best
to hanle it?

Thanks,

jim


NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.