Skip to content

Commit 545fcb7

Browse files
committed
Revert table status change
1 parent 24d1fad commit 545fcb7

1 file changed

Lines changed: 20 additions & 28 deletions

File tree

wp-includes/sqlite/class-wp-sqlite-translator.php

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ private function execute_select() {
15121512
$updated_query = preg_replace(
15131513
'/' . $table_name . '\.tables/i',
15141514
"(SELECT
1515-
'def' as TABLE_CATALOG, /* Standard value for TABLE_CATALOG */
1515+
'def' as TABLE_CATALOG,
15161516
'database' as TABLE_SCHEMA,
15171517
name as TABLE_NAME,
15181518
CASE type
@@ -1521,7 +1521,7 @@ private function execute_select() {
15211521
ELSE type
15221522
END as TABLE_TYPE,
15231523
'InnoDB' as ENGINE,
1524-
'Dynamic' as ROW_FORMAT, /* Standard InnoDB row format */
1524+
'Dynamic' as ROW_FORMAT,
15251525
0 as TABLE_ROWS,
15261526
0 as AVG_ROW_LENGTH,
15271527
0 as DATA_LENGTH,
@@ -3542,32 +3542,24 @@ private function execute_show() {
35423542
$database_expression = $this->rewriter->skip();
35433543
$stmt = $this->execute_sqlite_query(
35443544
"SELECT
3545-
'def' as TABLE_CATALOG, /* Standard value for TABLE_CATALOG */
3546-
'database' as TABLE_SCHEMA,
3547-
name as TABLE_NAME,
3548-
CASE type
3549-
WHEN 'table' THEN 'BASE TABLE'
3550-
WHEN 'view' THEN 'VIEW'
3551-
ELSE type
3552-
END as TABLE_TYPE,
3553-
'InnoDB' as ENGINE,
3554-
'Dynamic' as ROW_FORMAT, /* Standard InnoDB row format */
3555-
0 as TABLE_ROWS,
3556-
0 as AVG_ROW_LENGTH, /* Added missing column */
3557-
0 as DATA_LENGTH,
3558-
0 as MAX_DATA_LENGTH, /* Added missing column */
3559-
0 as INDEX_LENGTH,
3560-
0 as DATA_FREE,
3561-
NULL as AUTO_INCREMENT,
3562-
NULL as CREATE_TIME,
3563-
NULL as UPDATE_TIME,
3564-
NULL as CHECK_TIME,
3565-
'utf8mb4_general_ci' as TABLE_COLLATION,
3566-
NULL as CHECKSUM, /* Added missing column */
3567-
'' as CREATE_OPTIONS, /* Added missing column */
3568-
'' as TABLE_COMMENT,
3569-
10 as VERSION,
3570-
sql as CREATE_TABLE
3545+
name as `Name`,
3546+
'myisam' as `Engine`,
3547+
10 as `Version`,
3548+
'Fixed' as `Row_format`,
3549+
0 as `Rows`,
3550+
0 as `Avg_row_length`,
3551+
0 as `Data_length`,
3552+
0 as `Max_data_length`,
3553+
0 as `Index_length`,
3554+
0 as `Data_free` ,
3555+
0 as `Auto_increment`,
3556+
'2024-03-20 15:33:20' as `Create_time`,
3557+
'2024-03-20 15:33:20' as `Update_time`,
3558+
null as `Check_time`,
3559+
null as `Collation`,
3560+
null as `Checksum`,
3561+
'' as `Create_options`,
3562+
'' as `Comment`
35713563
FROM sqlite_master
35723564
WHERE
35733565
type='table'

0 commit comments

Comments
 (0)