User tests: Successful: Unsuccessful:
pdomysql
database type to mysql
pgsql
database type (the PDO PostgreSQL driver) to ensure things map correctly to established postgresql
structures (i.e. SQL schema paths)Mostly code review, if someone's running an environment supporting PDO PostgreSQL I think the CMS would actually be installable now (if I'm following the code right it wanted SQL files at installation/sql/pgsql
and that's not the case), same if you've got extension code floating around that might support PostgreSQL (patch tester would fall under this).
Status | New | ⇒ | Pending |
Category | ⇒ | Installation Libraries |
Labels |
Added:
?
|
At one point I'm pretty sure all that stuff was wrapped in checks. Apparently that got lost along the way too.
to move forward
in the libraries/vendor/joomla/database/Postgresql/PostgresqlDriver.sql we should consider to add
/**
* True if the database engine supports UTF-8 Multibyte (utf8mb4) character encoding.
*
* @var boolean
* @since 1.4.0
*/
protected $utf8mb4 = false;
and
/**
* Determine whether the database engine support the UTF-8 Multibyte (utf8mb4) character encoding.
*
* @return boolean True if the database engine supports UTF-8 Multibyte.
*
* @since __DEPLOY_VERSION__
*/
public function hasUTF8mb4Support()
{
return $this->utf8mb4;
}
and in https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/src/Model/DatabaseModel.php#L1190
if($db->hasUTF8mb4Support())
{
$query = $db->convertUtf8mb4QueryToUtf8($query);
}
it's becoming to be a long journey ....
No. The concept of UTF8MB4 is a MySQL specific thing, it doesn't belong in all drivers. At the Framework level this is addressed with UTF8MB4SupportInterface
(which declares the same two helper methods already present in the API, if you need cross-version compatible code just run method_exists('hasUTF8mb4Support');
until you can check $db instanceof UTF8MB4SupportInterface
).
sorry i'm unfamiliar with 4.x code, i'm just thinking out of loud
I've done a large share of the work in porting the CMS specific changes to the Framework repo (and internal restructuring for things like prepared statement support), I know some of this better than the back of my hand
sounds better ?
https://github.com/mbabker/joomla-cms/blob/008cd4891e881ab08194ee3190bfde568ae644ca/installation/src/Model/DatabaseModel.php#L1122
if ($db instanceof UTF8MB4SupportInterface)
{
if($db->hasUTF8mb4Support())
{
$query = $db->convertUtf8mb4QueryToUtf8($query);
}
/**
* This is a query which was supposed to convert tables to utf8mb4 charset but the server doesn't
* support utf8mb4. Therefore we don't have to run it, it has no effect and it's a mere waste of time.
*/
if (!$db->hasUTF8mb4Support() && stristr($query, 'CONVERT TO CHARACTER SET utf8 '))
{
continue;
}
}
Rebased and the utf8mb4 stuff wrapped in appropriate checks now (again).
sorry but it's still not correct for postgresql install
https://github.com/mbabker/joomla-cms/blob/b5c32d2dc6cda3f678c59b9fb44622bb0c995837/installation/src/Model/DatabaseModel.php#L1120-L1132
look at my previous comment #19989 (comment)
$db->hasUTF8mb4Support()
is invoked whatever $db
is an instanceof UTF8MB4SupportInterface
or not
My bad, didn't read far enough down the method. Fixed.
I have tested this item
on postgresql
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-15 12:08:19 |
Closed_By | ⇒ | wilsonge |
Hi,
first, sorry about reroll topic or something like
I start a dev enviroment for J4 Alpha5, PDO did not work.
No MySQL logs.
Apache logs are just warnings:
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /some_dir/plugins/system/debug/debug.php on line 617, referer: https://some_url/installation/index.php?view=remove&layout=default
When i select MySQLi installation works.
[Debian 9.5][PHP 7.3][MySQL 8][Joomla 4 Alpha 5]
uhmmm
what is your mysqlmode ?
SELECT @@GLOBAL.sql_mode global, @@SESSION.sql_mode session
Global
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
Session
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
well, then can you replace all of '0000-00-00 00:00:00'
in the *.sql
with '1000-01-01 00:00:00'
as a test ?
I'll try later, looks like 355 sql files
With some
i can suggest you to open a new issue....
I have tested this item✅ successfully on 3a51db5
Works fine for mysql(PDO) and mysqli
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19989.