Skip to content

2.1.17-alpha.1 release branch #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion load.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: SQLite Database Integration
* Description: SQLite database driver drop-in.
* Author: The WordPress Team
* Version: 2.1.17-alpha
* Version: 2.1.17-alpha.1
* Requires PHP: 7.0
* Textdomain: sqlite-database-integration
*
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: wordpressdotorg, aristath, janjakes, zieladam, berislav.grgic
Requires at least: 6.4
Tested up to: 6.6.1
Requires PHP: 7.0
Stable tag: 2.1.17-alpha
Stable tag: 2.1.17-alpha.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: performance, database
Expand Down
2 changes: 1 addition & 1 deletion tests/WP_SQLite_Metadata_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testInformationSchemaTables() {
$this->assertEquals(
array(
'TABLE_CATALOG' => 'def',
'TABLE_SCHEMA' => 'database',
'TABLE_SCHEMA' => '',
'TABLE_NAME' => 'wp_options',
'TABLE_TYPE' => 'BASE TABLE',
'ENGINE' => 'InnoDB',
Expand Down
6 changes: 4 additions & 2 deletions wp-includes/sqlite/class-wp-sqlite-translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1519,14 +1519,16 @@ private function execute_select() {

if ( $table_name && str_starts_with( strtolower( $table_name ), 'information_schema' ) ) {
$this->is_information_schema_query = true;
$updated_query = preg_replace(

$database_name = $this->pdo->quote( defined( 'DB_NAME' ) ? DB_NAME : '' );
$updated_query = preg_replace(
'/' . $table_name . '\.tables/i',
/**
* TODO: Return real values for hardcoded column values.
*/
"(SELECT
'def' as TABLE_CATALOG,
'database' as TABLE_SCHEMA,
$database_name as TABLE_SCHEMA,
name as TABLE_NAME,
CASE type
WHEN 'table' THEN 'BASE TABLE'
Expand Down