1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-19 04:41:53 +02:00

Issue #5490 Incorrect ALTER query created on index. Indexes added to admin_log for speed.

This commit is contained in:
camer0n
2025-05-06 18:08:52 -07:00
parent 6b9be7d412
commit 218d0a5afc
3 changed files with 25 additions and 1 deletions

View File

@@ -528,6 +528,27 @@ DATA;
}
$indexTests = [
0 => [
'input' => array ( 'type' => '', 'keyname' => 'dblog_eventcode', 'field' => 'dblog_eventcode', ),
'expected' => "INDEX `dblog_eventcode` (dblog_eventcode);"
],
1 => [
'input' => array ( 'type' => '', 'keyname' => 'dblog_eventcode,dblog_title', 'field' => 'dblog_eventcode_title', ),
'expected' => "INDEX `dblog_eventcode_title` (dblog_eventcode,dblog_title);"
],
2 => [
'input' => array ( 'type' => '', 'keyname' => 'dblog_user_id', 'field' => 'dblog_user_id', ),
'expected' => "INDEX `dblog_user_id` (dblog_user_id);"
]
];
foreach($indexTests as $k => $data)
{
$result = $this->dbv->toMysql($data['input'], 'index');
self::assertEquals($data['expected'], $result);
}
}
/*