1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 08:06:38 +02:00

17 Commits

Author SHA1 Message Date
camer0n
218d0a5afc Issue #5490 Incorrect ALTER query created on index. Indexes added to admin_log for speed. 2025-05-06 18:08:52 -07:00
camer0n
e5edbf665c Issue #5382 - Fix history table creation. 2025-04-08 17:29:10 -07:00
camer0n
ffec694673 Issue #5444 Initial working dynamic plugin test detection. 2025-03-16 11:43:30 -07:00
camer0n
0b89d5d301 Issue #5209 - Partial fix. Currently does not support FULLTEXT on a field that already has an INDEX. 2025-01-03 16:02:38 -08:00
camer0n
fed582ad30 Test fixes. 2024-04-17 11:34:32 -07:00
camer0n
b970aec7aa Issue #4501 Reinitialize db_verify after plugin installation. 2023-12-07 14:11:23 -08:00
camer0n
fc59e8211f Issue #4501 TBD 2023-12-06 16:12:27 -08:00
camer0n
c5333137ac Issue #4501 TBD 2023-12-06 16:04:11 -08:00
camer0n
2328cb4e6e Issue #4501 Modified Charset lookup. 2023-12-06 15:27:26 -08:00
camer0n
d14d47aa65 Issue #4501 Improve test. 2023-12-06 13:14:35 -08:00
camer0n
f71661336b Issue #4501 Improve test. 2023-12-06 13:11:35 -08:00
camer0n
3d000c8dc3 Issue #4501 - Improve verification and cron table engine. 2023-12-05 16:05:56 -08:00
Nick Liu
d790faa049 Convert and run e107 using the MySQL/MariaDB utf8mb4 character set and
InnoDB storage engine

Components affected:
* `db_verify` now checks and corrects the table storage engine
* `db_verify` now checks and corrects the table default character set
  * Note: Field character sets can still be overridden
  * Note: When correcting, the entire table is converted to the target
    charset.
* The alt_auth plugin now connects via PDO using the e107 default
  charset, utf8mb4
* `e_db_pdo` now sets the charset to utf8mb4. This is currently not
  customizable because it was previously not customizable.
* `install.php` now generates an `e107_config.php` file with
  `$mySQLcharset = 'utf8mb4';`, though this option is not actually used.
* `install.php` now removes plugin tables before installing plugins.
* `e_db_mysql` now only accepts the `utf8mb4` charset. Previously, it
  only accepted the `utf8` charset.
* `e_db_mysql` now configures `mysqli_real_escape_string` to match the
  new default charset, `utf8mb4`.
* Plugin installations now use the preferred MySQL table storage engines
  and charsets.

The preferred MySQL table storage engines are now mapped like so:
* If `ENGINE=MyISAM` is specified, the actual storage engine set will be
  the first available of: InnoDB, Aria, Maria, MyISAM
* If `ENGINE=Aria` is specified, the actual storage engine set will be
  the first available of: Aria, Maria, MyISAM
* If `ENGINE=InnoDB` is specified, the actual storage engine set will be
  the first available of: InnoDB, XtraDB
* If `ENGINE=XtraDB` is specified, the actual storage engine set will be
  the first available of: XtraDB, InnoDB

The preferred MySQL character set is now aliased like so:
* `utf8`    => `utf8mb4`
* `utf8mb3` => `utf8mb3`
* `utf8mb4` => `utf8mb4`

Fixes: #4501
2021-05-22 00:46:35 -05:00
Nick Liu
b623868756 db_verify::getIndex(): Support index_col_name optional parts
In the MariaDB `CREATE TABLE` [`index_definition`](https://mariadb.com/kb/en/create-table/#index-definitions),
 the `index_col_name` could have an optional length and a sort order:

```
index_definition:
    {INDEX|KEY} [index_name] [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] PRIMARY KEY [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY] [index_name] [index_type] (index_col_name,...) [index_option] ...
  {{{|}}} [CONSTRAINT [symbol]] FOREIGN KEY [index_name] (index_col_name,...) reference_definition

index_col_name:
    col_name [(length)] [ASC | DESC]

index_type:
    USING {BTREE | HASH | RTREE}

index_option:
    [ KEY_BLOCK_SIZE [=] value
  {{{|}}} index_type
  {{{|}}} WITH PARSER parser_name
  {{{|}}} COMMENT 'string'
  {{{|}}} CLUSTERING={YES| NO} ]
  [ IGNORED | NOT IGNORED ]

reference_definition:
    REFERENCES tbl_name (index_col_name,...)
      [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]
      [ON DELETE reference_option]
      [ON UPDATE reference_option]

reference_option:
    RESTRICT | CASCADE | SET NULL | NO ACTION
```

`db_verify::getIndex()` didn't handle this possibility, leading to a
database validity check failure despite the index actually existing.

Fixes: https://github.com/e107inc/e107/issues/5054
2023-08-17 17:27:26 +02:00
Cameron
1f502ce459 Fixes #4155 - database verification was failing when field name ended in a digit. 2020-05-16 13:14:29 -07:00
Nick Liu
a0f4489e41 Disabled db_verifyTest::testGetIndex() due to no assertions 2020-01-18 16:35:18 +01:00
Deltik
e49ee50d31 Preparation for merge with e107 repository
Moved all test files to e107_tests subdirectory
2019-11-27 11:18:53 -06:00