Re: [sqlite] about the apparently arriving soon "threads"

2014-04-08 Thread Keith Medcalf
>On Tue, Apr 8, 2014 at 11:00 PM, big stone  wrote:
>> Hi,
>>
>> I did experiment splitting my workload in 4 threads on my cpu i3-350m
>to
>> see what are the scaling possibilities.
>>
>> Timing :
>> 1 cpu = 28 seconds
>> 2 cpu = 16 seconds
>> 3 cpu = 15 seconds
>> 4 cpu = 14 seconds
>>
>
>If the info at http://ark.intel.com/products/43529/Intel-Core-i3-350M-
>Processor-3M-Cache-2_26-GHz
>is right, you have 2 cores, each having 2 threads. They're logically
>"cores", but physically not so. My tests with any multi-threading
>benchmarking including parallel quicksort showed that a similar i3
>mobile processor rarely benefit after 2 threads, probably cache
>coherence penalty is the cause. Desktop Intel Core i5-2310, for
>example, is a different beast (4 cores/4 threads), 3 threads almost
>always was x3 times faster, 4 threads - with a little drop.
>
>It all still depends on the application. Once I stopped believing a
>2-threaded Atom would show x2 in any of tests I made, when on one
>graphical one it finally made it. But still if number of threads are
>bigger than number of cores then it's probably a legacy of
>HyperThreading hardware Intel started multi-threading with

It greatly depends on the processor and whether the so-called hyper threads are 
real threads or half-assed threads.  Some Intel processors support real SMP 
threads in which there is no difference if your code is dispatched on the "main 
thread" or the "hyper-thread".  Other processors use very fake threads in which 
only a very small percentage of the ALU is available to the "hyper-thread" and 
only the main thread has access to the entire execution unit.  The former is 
good, the latter usually makes things run slower when multiple threads are 
running unless you and/or the application are smart enough to ensure that you 
set the thread affinity so that the thread dispatched to the half-assed thread 
never needs to access the parts of the execution unit that are never available 
to that thread.  If you do not take such care, then you will continually stall 
the decoding pipeline and the RISC microcode execution stream as the processor 
switches threads between the two pipelines.

For traditional (aka useless) hyper-threaded processors, you are usually better 
off to disable hyper-threading in the BIOS and dedicate all the execution unit 
resources to a single thread.  For processors that support SMP hyper-threading 
you generally get excellent multiprogramming ratio's until all the pipelines 
and execution units are fully consumed (assuming sufficient L1 and L2 cache 
that is well designed, and good code and data locality).  Often for a decent 
mix of compute and I/O, this means that you can load up almost full compute on 
all threads simultaneously and almost fully overlap all I/O waits with useful 
compute -- just like a real computer.




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


Re: [sqlite] Establishing a connection and downloading tables from an SQLite server

2014-04-08 Thread David King
> I guess that using a command line interface program could work. I used it
> for a local database and it worked perfectly, but the problem is that I'm
> not sure how to do it when the original file is in a remote server. Again,
> maybe I'm missing something obvious and if I am, I'm sorry.
> I need the downloads from a remote server to be scheduled. That's why I was
> thinking about using powershell - I have used it before in scheduling
> tasks. I still found your suggestion interesting, but I can't really make
> use of it effectively.

Sqlite databases are just files, it's not like mysql or postgres where you have 
to connect and operate on a remote server. Once you have the file you can use 
the tools you've been using.

So how to schedule the task and how to download the file is entirely unrelated 
to sqlite, it's entirely a product of the voip device and environment



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about the apparently arriving soon "threads"

2014-04-08 Thread Max Vlasov
On Tue, Apr 8, 2014 at 11:00 PM, big stone  wrote:
> Hi,
>
> I did experiment splitting my workload in 4 threads on my cpu i3-350m to
> see what are the scaling possibilities.
>
> Timing :
> 1 cpu = 28 seconds
> 2 cpu = 16 seconds
> 3 cpu = 15 seconds
> 4 cpu = 14 seconds
>

If the info at 
http://ark.intel.com/products/43529/Intel-Core-i3-350M-Processor-3M-Cache-2_26-GHz
is right, you have 2 cores, each having 2 threads. They're logically
"cores", but physically not so. My tests with any multi-threading
benchmarking including parallel quicksort showed that a similar i3
mobile processor rarely benefit after 2 threads, probably cache
coherence penalty is the cause. Desktop Intel Core i5-2310, for
example, is a different beast (4 cores/4 threads), 3 threads almost
always was x3 times faster, 4 threads - with a little drop.

It all still depends on the application. Once I stopped believing a
2-threaded Atom would show x2 in any of tests I made, when on one
graphical one it finally made it. But still if number of threads are
bigger than number of cores then it's probably a legacy of
HyperThreading hardware Intel started multi-threading with

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


Re: [sqlite] LINQ - SQLite | Compact Framework 3.5?

2014-04-08 Thread Joe Mistachkin

Ryan Finnesey wrote:
>
> Has Devart http://www.devart.com/company/ taken over the LINQ to SQLite
> project?  
> 

No idea, I've never had any dealings with them.  Also, I have not heard of
the "LINQ to SQLite" project, per se.

>
> I am looking for a way to add support for LINQ and SQLite in  Windows
> Embedded Handheld 6.5 witch users .net CF 3.5  I asked Devart but they
> do not support CF.
>

Does the .NET Compact Framework support LINQ at all?  If so, I would assume
it would be limited to v3.5?

>
> I asked Devart but they do not support CF.
>

The official .NET wrapper for SQLite, System.Data.SQLite, does support the
.NET Compact Framework, see:

https://system.data.sqlite.org/
 
--
Joe Mistachkin

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


Re: [sqlite] Establishing a connection and downloading tables from an SQLite server

2014-04-08 Thread mm.w
Hello,

design your own RPC layer thru https with all the credentials you need.

Best.




On Mon, Apr 7, 2014 at 12:21 PM, Armando Gonzalez wrote:

> Donald:
>
> I appreciate the response.
>
> I guess that using a command line interface program could work. I used it
> for a local database and it worked perfectly, but the problem is that I'm
> not sure how to do it when the original file is in a remote server. Again,
> maybe I'm missing something obvious and if I am, I'm sorry.
>
> I need the downloads from a remote server to be scheduled. That's why I was
> thinking about using powershell - I have used it before in scheduling
> tasks. I still found your suggestion interesting, but I can't really make
> use of it effectively.
>
> Thank you for your time and advice. I hope you could keep helping me!
>
> Armando
>
>  Original Message 
> Subject: Re: [sqlite] Establishing a connection and downloading tables
> from an SQLite server
> From: Donald Griggs 
> Date: Sat, April 05, 2014 5:31 am
> To: General Discussion of SQLite Database 
>
> Greetings, Armondo.
>
> Would a simple script invoking the Sqlite3 commandline interface
> programdo what you want?
> http://sqlite.org/sqlite.html
>
> sqlite3  possibly invoked by a cron job,
> where MyScriptFile contains something like:
> 
> .open MyAsteriskDatabaseFilename
> .mode csv
> .output MyExportFileName.csv 
> SELECT MyDesiredFields FROM MyDesiredTable
> WHERE MyConditions
> ORDER BY MyDesiredOrder;
> .quit
> =
>
>
>
>
>
>
> On Fri, Apr 4, 2014 at 12:45 PM, Armando Gonzalez > >wrote:
>
> > To whom it may concern:
> >
> > I am absolutely new to to the world of SQLite (and SQL in general, to be
> > honest, please don't assume any previous knowledge from me) and well, I
> > stumbled upon an SQLite issue I can't seem to resolve on my own.
> >
> > I have an Asterisk VoIP phone server at my workplace. It was installed by
> > an external company, and it provides a variety of services, like reports
> of
> > the phone activity, etc.
> >
> > It was (and still is) working fine, but one of my colleagues wanted a
> > different type of report that the external company wasn't supplying, and
> > they wouldn't be able to supply them as he wanted, to be honest.
> >
> > The external company granted me access to the server's databases, and I
> > learnt that they worked with SQLite. The server used a service called
> > SQLite Manager to manage the SQLite databases. The manager has an easy
> > enough to understand GUI, and I managed to download the table I needed
> > manually and produce the wanted reports with software locally installed
> in
> > my computer.
> >
> > That's all working fine. The thing is that it would be so much better and
> > much more efficient if I could automatically download the needed table to
> > produce the reports, because that way I could produce the reports much
> > faster and get on with other things I have to do.
> >
> > I have Google'd how to do it with Powershell and well, I don't really
> know
> > what I'm doing. I would really appreciate any assistance/guidance if
> > possible.
> >
> > As a quick recap:
> >
> > I need to automatically download a table from a SQLite database on a
> local
> > server.
> >
> > I have access to Visual Studio 2012 and Powershell if any programming is
> > necessary.
> >
> > Anyways, I'm going to leave it at that.
> >
> > Thank you very much for taking the time to read this and hopefully for
> > helping me in the future!
> >
> > Armando Gonzalez
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about the apparently arriving soon "threads"

2014-04-08 Thread Simon Slavin

On 8 Apr 2014, at 8:00pm, big stone  wrote:

> I did experiment splitting my workload in 4 threads on my cpu i3-350m to
> see what are the scaling possibilities.
> 
> Timing :
> 1 cpu = 28 seconds
> 2 cpu = 16 seconds
> 3 cpu = 15 seconds
> 4 cpu = 14 seconds
> 
> Analysis :
> - sqlite is such a small foot-print in memory, it is really scaling well
> with the number of cores,
> 
> - hyper-threaded cores are useless for a database workload,
>  (it was the first time I had the opportunity to really use 4 cores, so
> the first time I notice)
> 
> - but the plumbery I personnaly need to manage threading out of sqlite
> makes it not practical outside of a "test tube".

That's very interesting, Stone.  I especially like your concluding sentence.

Can I ask how big your database was and where your database was held ?  Was it 
on a rotating disk, on a solid state disk, or in memory ?

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


Re: [sqlite] about the apparently arriving soon "threads"

2014-04-08 Thread big stone
Hi,

I did experiment splitting my workload in 4 threads on my cpu i3-350m to
see what are the scaling possibilities.

Timing :
1 cpu = 28 seconds
2 cpu = 16 seconds
3 cpu = 15 seconds
4 cpu = 14 seconds

Analysis :
- sqlite is such a small foot-print in memory, it is really scaling well
with the number of cores,

- hyper-threaded cores are useless for a database workload,
  (it was the first time I had the opportunity to really use 4 cores, so
the first time I notice)

- but the plumbery I personnaly need to manage threading out of sqlite
makes it not practical outside of a "test tube".
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Andreas Kupries
On Mon, Apr 7, 2014 at 4:58 PM, Petite Abeille  wrote:
>
> On Apr 8, 2014, at 1:46 AM, Andreas Kupries  wrote:
>
>> Most generally, a website to show off any kind of contribution to
>> sqlite, be it custom function, virtual table, virtual filesystem,
>> schemata, other extensions, ... ?

Thanks.

>
> A bit obsolete, but:
>
> http://www.sqlite.org/contrib
>
> Perhaps github could be of interest as well:
>
> https://github.com/search?q=sqlite=cmdform
>
> For example:
>
> https://github.com/sqlcipher/sqlcipher



-- 
Andreas Kupries
Senior Tcl Developer
Code to Cloud: Smarter, Safer, Faster(tm)
F: 778.786.1133
andre...@activestate.com
http://www.activestate.com
Learn about Stackato for Private PaaS: http://www.activestate.com/stackato

EuroTcl'2014, July 12-13, Munich, GER -- http://www.eurotcl.tcl3d.org/
21'st Tcl/Tk Conference: Nov 10-14, Portland, OR, USA --
http://www.tcl.tk/community/tcl2014/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] More context on parse error

2014-04-08 Thread Nelson, Erik - 2
I've mentioned before on the list that a bit more context in parse error 
messages would be helpful in our application.  I hacked something quick that 
seems to work for us, posting it in case anyone else finds it useful or would 
like to improve on it.


/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,   /* The parser */
  int yymajor,   /* The major type of the error token */
  YYMINORTYPE yyminor/* The minor type of the error token */
){
  sqlite3ParserARG_FETCH;
#define TOKEN (yyminor.yy0)

  Token msg;
  msg.z = pParse->zTail;
  msg.n = pParse->sLastToken.z - pParse->zTail + pParse->sLastToken.n;
  if(msg.n > 36)
  {
 msg.z = msg.z + msg.n - 36;
 msg.n = 36;
  }
  assert( msg.z[0] );
  sqlite3ErrorMsg(pParse, "near \"%T<--here\": syntax error", );

  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
  assert( TOKEN.z[0] );  /* The tokenizer always gives us a token */
  
  /*sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", ); */
  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument 
variable */
}

*

--
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to handle simultaneous reads/writes in SQLite

2014-04-08 Thread Simon Slavin

On 8 Apr 2014, at 3:20pm, David Brown  wrote:

> It's my understanding that any number of reads can be going on
> simultaneously (from other threads even) but ONLY ONE thread can write at a
> time.  Is this correct?

Right.

> Also, how would one handle multiple threads reading and writing
> simultaneously if this is not the case?

While any connection is reading or writing to the database, the database is 
locked against anything else trying to write to it.  (This is simplified but 
gives you an idea of what it does.)  When thinking about this it's important to 
remember that all reads and writes involve transactions, whether you declared 
them or not.

> I have a database that is being written to once a second and another thread
> that tries to read ONCE from the same table being written to and write to
> another separate table (this is when I would experience a crash).
> 
> I fixed the crash by handling an exception for "database locked" which
> leads me to believe it was the second thread trying to write at the same
> time that was the problem.

Ensure that you have set a timeout value for each connection accessing that 
database.  Without this, SQLite will always interpret a clash as being serious 
enough to report an error.  By default no timeout is set.




A timeout of 5 seconds (or a few minutes) clears up most of the problems like 
the ones you described.  You shouldn't have to write your own code to do it.

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


Re: [sqlite] How to handle simultaneous reads/writes in SQLite

2014-04-08 Thread Igor Tandetnik

On 4/8/2014 10:20 AM, David Brown wrote:

It's my understanding that any number of reads can be going on
simultaneously (from other threads even) but ONLY ONE thread can write at a
time.  Is this correct?


This is correct.
--
Igor Tandetnik

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


Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Simon Slavin

On 8 Apr 2014, at 2:22pm, Jens Miltner  wrote:

> So what would cause SQLite not being able to use one of the two indexes I 
> have?

First, run "ANALYZE".

Then run "EXPLAIN QUERY PLAN ".

This may give you some clues about how SQLite is understanding your SELECT 
requirements when it works out a search strategy.

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


[sqlite] How to handle simultaneous reads/writes in SQLite

2014-04-08 Thread David Brown
Hi I'm new here,

I'm also new to databases in general.

My question is about how SQLite handles multiple simultaneous reads and
writes.

It's my understanding that any number of reads can be going on
simultaneously (from other threads even) but ONLY ONE thread can write at a
time.  Is this correct?

Also, how would one handle multiple threads reading and writing
simultaneously if this is not the case?

I have a database that is being written to once a second and another thread
that tries to read ONCE from the same table being written to and write to
another separate table (this is when I would experience a crash).

I fixed the crash by handling an exception for "database locked" which
leads me to believe it was the second thread trying to write at the same
time that was the problem.

Thanks in advance,

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


Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Clemens Ladisch
Jens Miltner wrote:
> apart from a JOIN statement, there is no WHERE clause relating to table "a"

For purposes of optimization, an inner join is the same as a WHERE clause.

> LEFT JOIN a ON a.b_id=b.id AND a.identifier=x.identifier

An outer join, however, requires that the left table is used for the
outer loop of the nested loop join, i.e., the database must take each
record in a and looks up the corresponding record(s) in b.  An index
for a helps only when there is some (other) WHERE clause that restricts
the eligible records in a.


In theory, an index on a (automatic or not) should not be necessary for
this query.  In practice, what is the output of EXPLAIN QUERY PLAN for
this query, and what is the column reported by the warning?


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


Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Eduardo Morras
On Tue, 08 Apr 2014 15:22:18 +0200
Jens Miltner  wrote:

> CREATE INDEX a_idx1 ON a(b_id);
> CREATE INDEX a_idx2 ON a(identifier, b_id);
> 
> both of which could be used according to the JOIN statement and/or
> the CASE statement (if this part would use an index at all).
> 
> 
> I understand it's hard to tell where the problem is without knowing
> the complete query details, but maybe some hint on what would prevent
> the use of a regular index might help pointing me in the right
> direction...

Did you run ANALYZE?

Is b_id table a primary key? If it is then delete it because Sqlite adds 
primary key on indexs by default. Run analyze/reindex after change.

> 
> Thanks,
> -jens
> 
> 


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


Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Jens Miltner

Am 07.04.2014 um 18:42 schrieb Richard Hipp :

> On Mon, Apr 7, 2014 at 11:51 AM, Jens Miltner  wrote:
> 
>> We get an sqlite3_log() message with errorCode 284 and message "automatic
>> index on ...".
>> I assume this is some performance penalty warning, but I have no idea what
>> to make of it:
>> 
>> We do have an explicit index on the table and column mentioned in the
>> warning message, so I don't know what to do to avoid this warning and
>> potentially improve the query performance.
>> 
> 
> The warning is to let you know that SQLite could not find a way to use your
> index and so it had to make its own index, which might result in a query
> that is slower than you were counting on.

So what would cause SQLite not being able to use one of the two indexes I have?
Unfortunately, the actual query itself is somewhat complex and requires 
temporary tables & views, so I can't easily post it with enough context, but 
apart from a JOIN statement, there is no WHERE clause relating to table "a" 
(which is the one for which the auto index message is logged). The only 
additional place in the query where table "a" is referenced is in a CASE 
statement in the SELECT part, like

SELECT DISTINCT
...
CASE WHEN a.identifier NOT NULL THEN CASE IFNULL(c.state, 0) IN (1, 2, 
4) THEN 0 ELSE 1 END ELSE 1 END AS aState,
...
FROM
...
LEFT JOIN a ON a.b_id=b.id AND a.identifier=x.identifier
...

These are the only references to table "a" in the query and we do have a couple 
of indexes on a, the two that would apply here are

CREATE INDEX a_idx1 ON a(b_id);
CREATE INDEX a_idx2 ON a(identifier, b_id);

both of which could be used according to the JOIN statement and/or the CASE 
statement (if this part would use an index at all).


I understand it's hard to tell where the problem is without knowing the 
complete query details, but maybe some hint on what would prevent the use of a 
regular index might help pointing me in the right direction...

Thanks,
-jens


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


Re: [sqlite] Crashing in sqlite3_free->sqlite3MallocSize() function

2014-04-08 Thread Domingo Alvarez Duarte
You should provide a test case to get help from other people !


On Tue, Apr 8, 2014 at 11:28 AM, Ashok Pitambar wrote:

> Hi All,
>
> While executing query multiple times in a loop I encountered crash in
> function sqlite3MallocSize() which is called from sqlite3_free(). I see
> that
> an invalid memory 0x is being freed here instead of
> address range 0x81BD0C98-0x81BD0E50. Any idea what is happening
> here?
>
> stack trace:
>
> -000|sqlite3MallocSize(
> |pPrior = 0x)
>
> 001|sqlite3_free(
> |p = 0x)
> |
> |
> -002|releaseMemArray(
> |p = 0x81BD0C98,
> |  ?)
> |  pEnd  = 0x81BD0E50
> |  db= 0x812AB798
> |  malloc_failed =   0 = 0x00
> |
> |
> -003|closeAllCursors(
> |p = 0x81BDB3C8)
> |
> |
> -004|sqlite3VdbeHalt(
> |p = 0x81BDB3C8)
> |  db  = 0x812AB798
> |
> |
> -005|sqlite3VdbeExec(
> |p = 0x81BDB3C8)
> |  db   = 0x812AB798
> |  pIn1 = 0x81BD0BF8
> |  pIn2 = 0x812B38D8
> |  pIn3 = 0x81BD0BF8
> |  u= (aa = (pcDest =
> -2118316664 = 0x81BD0D88), ab = (cnt = -2118316
> |  and_logic= (  0 = 0x00,   0 = 0x00,
>   0 = 0x00,   0 = 0x00,   1 = 0x01,
> |  or_logic = (  0 = 0x00,   1 = 0x01,
>   2 = 0x02,   1 = 0x01,   1 = 0x01,
> |
> |
> -006|sqlite3Step(
> |  ?)
> |
> |
> -007|sqlite3_step(
> |pStmt = 0x81BDB3C8)
> |  rc2  =   0 = 0x
> |  v= 0x81BDB3C8
> |  cnt  =   0 = 0x
> |  db   = 0x812AB798
> |
> |
> -008|KN_Sqlite_DB_ExecQueryInSequence(
> |  ?)
> |  pVM  = 0x81BDB3C8
> |  mpDB = 0x812AB798
>
> Regards,
> Ashok
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Crashing in sqlite3_free->sqlite3MallocSize() function

2014-04-08 Thread Ashok Pitambar
Hi All,

While executing query multiple times in a loop I encountered crash in
function sqlite3MallocSize() which is called from sqlite3_free(). I see
that
an invalid memory 0x is being freed here instead of
address range 0x81BD0C98-0x81BD0E50. Any idea what is happening
here?

stack trace:

-000|sqlite3MallocSize(
|pPrior = 0x)

001|sqlite3_free(
|p = 0x)
|
|
-002|releaseMemArray(
|p = 0x81BD0C98,
|  ?)
|  pEnd  = 0x81BD0E50
|  db= 0x812AB798
|  malloc_failed =   0 = 0x00
|
|
-003|closeAllCursors(
|p = 0x81BDB3C8)
|
|
-004|sqlite3VdbeHalt(
|p = 0x81BDB3C8)
|  db  = 0x812AB798
|
|
-005|sqlite3VdbeExec(
|p = 0x81BDB3C8)
|  db   = 0x812AB798
|  pIn1 = 0x81BD0BF8
|  pIn2 = 0x812B38D8
|  pIn3 = 0x81BD0BF8
|  u= (aa = (pcDest =
-2118316664 = 0x81BD0D88), ab = (cnt = -2118316
|  and_logic= (  0 = 0x00,   0 = 0x00,
  0 = 0x00,   0 = 0x00,   1 = 0x01,
|  or_logic = (  0 = 0x00,   1 = 0x01,
  2 = 0x02,   1 = 0x01,   1 = 0x01,
|
|
-006|sqlite3Step(
|  ?)
|
|
-007|sqlite3_step(
|pStmt = 0x81BDB3C8)
|  rc2  =   0 = 0x
|  v= 0x81BDB3C8
|  cnt  =   0 = 0x
|  db   = 0x812AB798
|
|
-008|KN_Sqlite_DB_ExecQueryInSequence(
|  ?)
|  pVM  = 0x81BDB3C8
|  mpDB = 0x812AB798

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


Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Niall O'Reilly
At 08 Apr 2014 09:53 +0100,
Tim Streater wrote:
> 
> On 08 Apr 2014 at 00:13, Richard Hipp  wrote:
> 
> > On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian
> > wrote:
> >
> >>
> >> However, on production *nix machines, the path to the SQLite 'sar'
> >> will probably have to be absolute, or else the native 'sar' (System
> >> Activity Reporter) will run instead.
> >>
> >
> > Huh.  Never heard of it.  It is not installed on my Ubuntu desktop.
> 
> OS X has it, just checked. But I'd never heard of it either.

  Solaris too, even since before SunOS was re-branded "Solaris".
  
  ATB
  Niall O'Reilly
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Tim Streater
On 08 Apr 2014 at 00:13, Richard Hipp  wrote:

> On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian
> wrote:
>
>>
>> However, on production *nix machines, the path to the SQLite 'sar'
>> will probably have to be absolute, or else the native 'sar' (System
>> Activity Reporter) will run instead.
>>
>
> Huh.  Never heard of it.  It is not installed on my Ubuntu desktop.

OS X has it, just checked. But I'd never heard of it either.

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