Plugin Directory

Changeset 3068813

Timestamp:
04/11/2024 07:19:32 AM (4 months ago)
Author:
aristath
Message:

v2.1.8

Location:
sqlite-database-integration/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sqlite-database-integration/trunk/load.php

    r3062445 r3068813  
    44 * Description: SQLite database driver drop-in.
    55 * Author: The WordPress Team
    6  * Version: 2.1.7
     6 * Version: 2.1.
    77 * Requires PHP: 7.0
    88 * Textdomain: sqlite-database-integration
  • sqlite-database-integration/trunk/readme.txt

    r3062445 r3068813  
    55Tested up to:      6.4
    66Requires PHP:      5.6
    7 Stable tag:        2.1.7
     7Stable tag:        2.1.
    88License:           GPLv2 or later
    99License 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  
    7777        'ucase'          => 'ucase',
    7878        'lcase'          => 'lcase',
     79
    7980        'inet_ntoa'      => 'inet_ntoa',
    8081        'inet_aton'      => 'inet_aton',
     
    635636
    636637    /**
     638
     639
     640
     641
     642
     643
     644
     645
     646
     647
     648
     649
     650
     651
     652
    637653     * Method to emulate MySQL INET_NTOA() function.
    638654     *
  • sqlite-database-integration/trunk/wp-includes/sqlite/class-wp-sqlite-translator.php

    r3015055 r3068813  
    10551055        $result->mysql_data_type    = $skip_mysql_data_type_parts[1];
    10561056
    1057         // Look for the NOT NULL and AUTO_INCREMENT flags.
     1057        // Look for the NOT NULL and AUTO_INCREMENT flags.
    10581058        while ( true ) {
    10591059            $token = $this->rewriter->skip();
     
    11231123        if ( $field->not_null ) {
    11241124            $definition .= ' NOT NULL';
     1125
     1126
     1127
     1128
     1129
     1130
     1131
     1132
    11251133        }
    11261134        if ( null !== $field->default ) {
     
    18251833            || $this->translate_ungrouped_having( $token )
    18261834            || $this->translate_like_escape( $token )
     1835
    18271836        );
    18281837    }
     
    20232032        $this->rewriter->skip();
    20242033        $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
    20252069        return true;
    20262070    }
     
    30253069            case 'CREATE PROCEDURE':
    30263070                $this->results = true;
     3071
     3072
     3073
     3074
     3075
     3076
     3077
     3078
     3079
     3080
    30273081                return;
    30283082
     
    31423196
    31433197            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
    31453215                $database_expression = $this->rewriter->skip();
    31463216                $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                    )
    31483245                );
    3149 
    31503246                $tables = $this->strip_sqlite_system_tables( $stmt->fetchAll( $this->pdo_fetch_mode ) );
    31513247                foreach ( $tables as $table ) {
Note: See TracChangeset for help on using the changeset viewer.