开源数据库,SQLite 3.8.8 发布

jopen 9年前

SQLite 3.8.8 发布,此版本是 SQLite 常规的维护版本,没有引人注目的新特性或者性能改进,只是不断的在改进。主要的性能提升是通过重构 B-Tree 重整逻辑来避免不必要的 memcpy() 操作。新特性包括 PRAGMA data_version 状态,可以访问一个 VALUES clause ,不限制任意行数。此外解决了一些 Mac 上的编译错误和多线程问题。

SQLite Release 3.8.8 On 2015-01-16 (3.8.8)

    New Features:

  • Added the PRAGMA data_version command that can be used to determine if a database file has been modified by another process.
  • Added the SQLITE_CHECKPOINT_TRUNCATE option to the sqlite3_wal_checkpoint_v2() interface, with corresponding enhancements to PRAGMA wal_checkpoint.
  • Added the sqlite3_stmt_scanstatus() interface, available only when compiled with SQLITE_ENABLE_STMT_SCANSTATUS.
  • The sqlite3_table_column_metadata() is enhanced to work correctly on WITHOUT ROWID tables and to check for the existence of a a table if the column name parameter is NULL. The interface is now also included in the build by default, without requiring the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
  • Added the SQLITE_ENABLE_API_ARMOR compile-time option.
  • Added the SQLITE_REVERSE_UNORDERED_SELECTS compile-time option.
  • Added the SQLITE_SORTER_PMASZ compile-time option and SQLITE_CONFIG_PMASZ start-time option.
  • Added the SQLITE_CONFIG_PCACHE_HDRSZ option to sqlite3_config() which makes it easier for applications to determine the appropriate amount of memory for use with SQLITE_CONFIG_PAGECACHE.
  • The number of rows in a VALUES clause is no longer limited by SQLITE_LIMIT_COMPOUND_SELECT.
  • Added the eval.c loadable extension that implements an eval() SQL function that will recursively evaluate SQL.

    Performance Enhancements:

  • Reduce the number of memcpy() operations involved in balancing a b-tree, for 3.2% overall performance boost.
  • Improvements to cost estimates for the skip-scan optimization.
  • The automatic indexing optimization is now capable of generating a partial index if that is appropriate.

    Bug fixes:

  • Ensure durability following a power loss with "PRAGMA journal_mode=TRUNCATE" by calling fsync() right after truncating the journal file.
  • The query planner now recognizes that any column in the right-hand table of a LEFT JOIN can be NULL, even if that column has a NOT NULL constraint. Avoid trying to optimize out NULL tests in those cases. Fix for ticket 6f2222d550f5b0ee7ed.
  • Make sure ORDER BY puts rows in ascending order even if the DISTINCT operator is implemented using a descending index. Fix for ticket c5ea805691bfc4204b1cb9e.
  • Fix data races that might occur under stress when running with many threads in shared cache mode where some of the threads are opening and closing connections.
  • Fix obscure crash bugs found by american fuzzy lop. Ticket a59ae93ee990a55.
  • Work around a GCC optimizer bug (for gcc 4.2.1 on MacOS 10.7) that caused the R-Tree extension to compute incorrect results when compiled with -O3.

    Other changes:

  • Disable the use of the strchrnul() C-library routine unless it is specifically enabled using the -DHAVE_STRCHRNULL compile-time option.
  • Improvements to the effectiveness and accuracy of the likelihood(), likely(), and unlikely() SQL hint functions.
  • SQLITE_SOURCE_ID: "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf"
  • SHA1 for sqlite3.c: 91aea4cc722371d58aae3d22e94d2a4165276905
  • </ul>

    SQLite是遵守ACID的 关联式数据库 管理系统,它包含在一个相对小的C库中。它是 D.RichardHipp 建立的公有领域项目。

    不像常见的 客户-服务器 范例,SQLite引擎不是个程序与之通信的独立进程,而是连接到程序中成为它的一个主要部分。所以主要的通信协议是在编程语言内的直接 API 调用。这在消耗总量、延迟时间和整体简单性上有积极的作用。整个数据库(定义、表、索引和数据本身)都在宿主主机上存储在一个单一的文件中。它的简单的设计是通过在开始一个事务的时候锁定整个数据文件而完成的。

    特征

    库实现了多数的SQL-92标准,包括 事务 ,就是代表 原子性一致性隔离性持久性 的(ACID),触发器和多数的复杂查询。不进行 类型检查 。你可以把字符串插入到整数列中。例如,某些用户发现这是使数据库更加有用的创新,特别是与无类型的脚本语言一起使用的时候。其他用户认为这是主要的缺点。

    多个 进程线程 可以访问同一个数据而没有问题。可以并行的满足多个读访问。只有在其他访问当前不被服务的时候才能满足写访问;否则写访问失败并带有一个错误代码(也可以在可配置的超时过期之后自动的重试)。

    提供了叫做sqlite的一个独立程序用来查询和管理SQLite数据库文件。 它也充当写使用SQLite库的应用的一个例子。

    语言绑定

    可以从C/C++程序中使用这个库,还可以获得对Tcl和一些其他脚本语言的绑定。

    在CPAN的 DBD::SQLite 上有一个Perl的 DBI/DBD 模块,它不是到SQLite的接口,而是包括整个SQLite数据库引擎在其中并不需要任何额外的软件。

    还有一个Python模块叫做 PySQLite

    PHP从PHP5.0开始包含了SQLite,但是自5.1版之后开始成为一个延伸函式库。SQLite能与PHP4一起工作但不包含在其中。

    Rails 2.0.3将缺省的数据库配置改为了SQLite 3

    SQLite管理客户端

    SQLite亦可以作为桌面数据库使用,以下为第三方SQLite的 GUI 软件。例如,

    • SQLiteMan,使用QT开发的一个SQLite客户端,支持多语言、跨平台。 SQLiteMan

    • SQLite Manager, 以 火狐浏览器的扩展 形式提供的SQLite客户端。

    • SQLite Database Browser , a graphical client to access SQLite databases

    • SqlPro SQL Client , another graphical client to work with SQLite databases