@@ -1509,29 +1509,35 @@ private function execute_select() {
15091509
15101510 if ( $ table_name && str_starts_with ( strtolower ( $ table_name ), 'information_schema ' ) ) {
15111511 $ this ->is_information_schema_query = true ;
1512- $ updated_query = preg_replace (
1513- '/ ' . $ table_name. '\.tables/i ' ,
1512+ $ updated_query = preg_replace (
1513+ '/ ' . $ table_name . '\.tables/i ' ,
15141514 "(SELECT
1515- name as TABLE_NAME,
1515+ 'def' as TABLE_CATALOG, /* Standard value for TABLE_CATALOG */
15161516 'database' as TABLE_SCHEMA,
1517+ name as TABLE_NAME,
15171518 CASE type
15181519 WHEN 'table' THEN 'BASE TABLE'
15191520 WHEN 'view' THEN 'VIEW'
15201521 ELSE type
15211522 END as TABLE_TYPE,
15221523 'InnoDB' as ENGINE,
1523- 'utf8mb4_general_ci' as TABLE_COLLATION,
1524- '' as TABLE_COMMENT,
1525- sql as CREATE_TABLE,
1526- NULL as AUTO_INCREMENT,
1527- NULL as CREATE_TIME,
1528- NULL as UPDATE_TIME,
1529- NULL as CHECK_TIME,
1524+ 'Dynamic' as ROW_FORMAT, /* Standard InnoDB row format */
15301525 0 as TABLE_ROWS,
1526+ 0 as AVG_ROW_LENGTH,
15311527 0 as DATA_LENGTH,
1528+ 0 as MAX_DATA_LENGTH,
15321529 0 as INDEX_LENGTH,
15331530 0 as DATA_FREE,
1534- 10 as VERSION
1531+ NULL as AUTO_INCREMENT,
1532+ NULL as CREATE_TIME,
1533+ NULL as UPDATE_TIME,
1534+ NULL as CHECK_TIME,
1535+ 'utf8mb4_general_ci' as TABLE_COLLATION,
1536+ NULL as CHECKSUM,
1537+ '' as CREATE_OPTIONS,
1538+ '' as TABLE_COMMENT,
1539+ 10 as VERSION,
1540+ sql as CREATE_TABLE
15351541 FROM sqlite_master
15361542 WHERE type IN ('table', 'view')) " ,
15371543 $ updated_query
@@ -2805,7 +2811,7 @@ function ( $table ) {
28052811 * for the name/table_name column, the table would be removed.
28062812 */
28072813 $ table_name = true ;
2808- $ table = (array ) $ table ;
2814+ $ table = (array ) $ table ;
28092815 if ( isset ( $ table ['Name ' ] ) ) {
28102816 $ table_name = $ table ['Name ' ];
28112817 } elseif ( isset ( $ table ['table_name ' ] ) ) {
@@ -3536,24 +3542,32 @@ private function execute_show() {
35363542 $ database_expression = $ this ->rewriter ->skip ();
35373543 $ stmt = $ this ->execute_sqlite_query (
35383544 "SELECT
3539- name as `Name`,
3540- 'myisam' as `Engine`,
3541- 10 as `Version`,
3542- 'Fixed' as `Row_format`,
3543- 0 as `Rows`,
3544- 0 as `Avg_row_length`,
3545- 0 as `Data_length`,
3546- 0 as `Max_data_length`,
3547- 0 as `Index_length`,
3548- 0 as `Data_free` ,
3549- 0 as `Auto_increment`,
3550- '2024-03-20 15:33:20' as `Create_time`,
3551- '2024-03-20 15:33:20' as `Update_time`,
3552- null as `Check_time`,
3553- null as `Collation`,
3554- null as `Checksum`,
3555- '' as `Create_options`,
3556- '' as `Comment`
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
35573571 FROM sqlite_master
35583572 WHERE
35593573 type='table'
0 commit comments