Firefox锁定places.sqlite [英] Firefox locks places.sqlite

查看:256
本文介绍了Firefox锁定places.sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

平台:Firefox 3.6.13,Python 2.7 stackless和Windows 7(还没有在Ubuntu上测试过,我会...)



apsw library:

  conn = apsw.Connection(dir + profile +'/places.sqlite',apsw.SQLITE_OPEN_READONLY)

我得到错误:


文件c:\apsw\src\statementcache.c,
行386,在sqlite3_prepare
apsw.BusyError:BusyError:数据库是
锁定
p>

我看到SQLite manager也可以在Firefox运行的情况下打开数据库。



我只想打开和阅读,我觉得一个无故障的操作。而且我不能使用SQLite管理器。我需要编写我的Python(或者PHP或者Perl)脚本。
$ b $ 1)Firefox在SQLite文件上使用哪种类型的锁?为什么?

2)SQLite经理是如何工作的?




Q2)SQLite Manager可以在Firefox中运行,所以它可以访问数据库。



这不是我正在寻找的:外部应用程序的阅读地点而Firefox正在运行。

解决方案

Firefox使用SQLite获取数据库上的EXCLUSIVE锁,这就是为什么您无法打开它:
http://www.sqlite.org/pragma.html#pragma_locking_mode

Platform: Firefox 3.6.13, Python 2.7 stackless, and Windows 7 (not yet tested on Ubuntu, I will...)

I tried with the apsw library:

conn = apsw.Connection( dir + profile + '/places.sqlite', apsw.SQLITE_OPEN_READONLY )

And I got the error:

File "c:\apsw\src\statementcache.c", line 386, in sqlite3_prepare apsw.BusyError: BusyError: database is locked

I see "SQLite manager" can open the database also with Firefox running.

I just want to open and read, I think a trouble free operation. And I cannot use "SQLite manager". I need to code my Python (or PHP or Perl) script.

1) Which type of lock does Firefox use on the SQLite file? Why?

2) How does "SQLite manager" work?


Q2) SQLite Manager works in JavaScript, inside Firefox, so it can access the database.

This is not what I am looking for: An external application reading places while Firefox is running.

解决方案

Firefox uses SQLite to obtain an EXCLUSIVE lock on the database, which is why you cannot open it: http://www.sqlite.org/pragma.html#pragma_locking_mode

这篇关于Firefox锁定places.sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆