Changeset 3068813
- Timestamp:
- 04/11/2024 07:19:32 AM (4 months ago)
- Location:
- sqlite-database-integration/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sqlite-database-integration/trunk/load.php
r3062445 r3068813 4 4 * Description: SQLite database driver drop-in. 5 5 * Author: The WordPress Team 6 * Version: 2.1. 76 * Version: 2.1. 7 7 * Requires PHP: 7.0 8 8 * Textdomain: sqlite-database-integration -
sqlite-database-integration/trunk/readme.txt
r3062445 r3068813 5 5 Tested up to: 6.4 6 6 Requires PHP: 5.6 7 Stable tag: 2.1. 77 Stable tag: 2.1. 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
sqlite-database-integration/trunk/wp-includes/sqlite/class-wp-sqlite-pdo-user-defined-functions.php
r3015055 r3068813 77 77 'ucase' => 'ucase', 78 78 'lcase' => 'lcase', 79 79 80 'inet_ntoa' => 'inet_ntoa', 80 81 'inet_aton' => 'inet_aton', … … 635 636 636 637 /** 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 637 653 * Method to emulate MySQL INET_NTOA() function. 638 654 * -
sqlite-database-integration/trunk/wp-includes/sqlite/class-wp-sqlite-translator.php
r3015055 r3068813 1055 1055 $result->mysql_data_type = $skip_mysql_data_type_parts[1]; 1056 1056 1057 // Look for the NOT NULL and AUTO_INCREMENT flags.1057 // Look for the NOT NULL and AUTO_INCREMENT flags. 1058 1058 while ( true ) { 1059 1059 $token = $this->rewriter->skip(); … … 1123 1123 if ( $field->not_null ) { 1124 1124 $definition .= ' NOT NULL'; 1125 1126 1127 1128 1129 1130 1131 1132 1125 1133 } 1126 1134 if ( null !== $field->default ) { … … 1825 1833 || $this->translate_ungrouped_having( $token ) 1826 1834 || $this->translate_like_escape( $token ) 1835 1827 1836 ); 1828 1837 } … … 2023 2032 $this->rewriter->skip(); 2024 2033 $this->rewriter->add( new WP_SQLite_Token( 'DATETIME', WP_SQLite_Token::TYPE_KEYWORD, WP_SQLite_Token::FLAG_KEYWORD_FUNCTION ) ); 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2025 2069 return true; 2026 2070 } … … 3025 3069 case 'CREATE PROCEDURE': 3026 3070 $this->results = true; 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3027 3081 return; 3028 3082 … … 3142 3196 3143 3197 case 'TABLE STATUS': // FROM `database`. 3144 $this->rewriter->skip(); 3198 // Match the optional [{FROM | IN} db_name] 3199 $database_expression = $this->rewriter->consume(); 3200 if ( $database_expression->token === 'FROM' || $database_expression->token === 'IN' ) { 3201 $this->rewriter->consume(); 3202 $database_expression = $this->rewriter->consume(); 3203 } 3204 3205 $pattern = '%'; 3206 // [LIKE 'pattern' | WHERE expr] 3207 if($database_expression->token === 'LIKE') { 3208 $pattern = $this->rewriter->consume()->value; 3209 } else if($database_expression->token === 'WHERE') { 3210 // @TODO Support me please. 3211 } else if($database_expression->token !== ';') { 3212 throw new Exception( 'Syntax error: Unexpected token ' . $database_expression->token .' in query '. $this->mysql_query ); 3213 } 3214 3145 3215 $database_expression = $this->rewriter->skip(); 3146 3216 $stmt = $this->execute_sqlite_query( 3147 "SELECT name as `Name`, 'myisam' as `Engine`, 0 as `Data_length`, 0 as `Index_length`, 0 as `Data_free` FROM sqlite_master WHERE type='table' ORDER BY name" 3217 "SELECT 3218 name as `Name`, 3219 'myisam' as `Engine`, 3220 10 as `Version`, 3221 'Fixed' as `Row_format`, 3222 0 as `Rows`, 3223 0 as `Avg_row_length`, 3224 0 as `Data_length`, 3225 0 as `Max_data_length`, 3226 0 as `Index_length`, 3227 0 as `Data_free` , 3228 0 as `Auto_increment`, 3229 '2024-03-20 15:33:20' as `Create_time`, 3230 '2024-03-20 15:33:20' as `Update_time`, 3231 null as `Check_time`, 3232 null as `Collation`, 3233 null as `Checksum`, 3234 '' as `Create_options`, 3235 '' as `Comment` 3236 FROM sqlite_master 3237 WHERE 3238 type='table' 3239 AND name LIKE :pattern 3240 ORDER BY name", 3241 3242 array( 3243 ':pattern' => $pattern, 3244 ) 3148 3245 ); 3149 3150 3246 $tables = $this->strip_sqlite_system_tables( $stmt->fetchAll( $this->pdo_fetch_mode ) ); 3151 3247 foreach ( $tables as $table ) {
Note: See TracChangeset
for help on using the changeset viewer.