? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
23 Aug 2016

Pull Request for Issue #9457 and new issue (in MSSQL).

Summary of Changes

This solves languages (and probably other extensions) install problems in MSSQL and "PDO (MySQL)" in strict mode.

Testing Instructions

  • For "PDO (MySQL)" see #9457
  • For "MSSQL" try to install languages on install or after install before patch (don't work), after patch (should work).
  • Test also upgrade process.
  • Code review.

Documentation Changes Required

None.

@alikon @waader since you are the db experts please check and review.

7c9901c 23 Aug 2016 avatar andrepereiradasilva ups
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2016
Category SQL Administration Components MS SQL Installation
avatar andrepereiradasilva andrepereiradasilva - open - 23 Aug 2016
avatar andrepereiradasilva andrepereiradasilva - change - 23 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2016
Labels Added: ?
avatar waader waader - test_item - 23 Aug 2016 - Not tested
avatar waader
waader - comment - 23 Aug 2016

I have not tested this item.

- I applied your patch

  • made a fresh installation with mysql_pdo
  • added $this->connection->query("SET @@SESSION.sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';"); in line 155 of the pdo-mysqldriver (although I am using mysql 5.6.28)
  • and got the following error when I went to extensions > manage > install languages SQLSTATE[HY000]: General error: 1364 Field 'data' doesn't have a default value
    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.
avatar andrepereiradasilva
andrepereiradasilva - comment - 23 Aug 2016

hum, so it seems we have another data columns without default value ...
i bet is this one https://github.com/joomla/joomla-cms/blob/staging/installation/sql/mysql/joomla.sql#L1765

avatar alikon
alikon - comment - 23 Aug 2016

@waader i can confirm your findings on pdo but i'm quite sure is the same mssql

@andrepereiradasilva you have opend a "Pandora's box" (pdo-mysql + mssql)

and yes your bet is winning

i'm still testing on pdo but for me the schema should be something like this:
data1

plus
data2

in this way i'm able to go a little forward ...
....now i'm stuck on asset_id

data3

....

avatar andrepereiradasilva
andrepereiradasilva - comment - 23 Aug 2016

ok so the data column should be fixed now.

avatar andrepereiradasilva
andrepereiradasilva - comment - 23 Aug 2016

@andrepereiradasilva you have opend a "Pandora's box" (pdo-mysql + mssql)

i have that strange habit ?

But, IMO this PDO strict mode is a good thing because it makes all databases work in similiar way.
IMO 4.0 should only accept strict mode.

avatar waader waader - test_item - 24 Aug 2016 - Tested successfully
avatar waader
waader - comment - 24 Aug 2016

I have tested this item successfully on 2f70844

Now works for pdo_mysql and mssql. After login to the mssql instance there is another error showing up but that´s another story.

One suggestion: It would be nice to see the sqlmode in systemsinformation.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar alikon
alikon - comment - 24 Aug 2016

@waader did you test installing a fresh new site with multilingual enabled
and with at least 2 languages ?

On 24 Aug 2016 11:02 am, "waader" notifications@github.com wrote:

I have tested this item successfully on 2f70844
2f70844

Now works for pdo_mysql and mssql. After login to the mssql instance there
is another error showing up but that´s another story.

One suggestion: It would be nice to see the sqlmode in systemsinformation.

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/11763
https://issues.joomla.org/tracker/joomla-cms/11763.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11763 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALFsUpxUDmA4Un_Z1tdjTu4XnqJMBvnks5qjAiRgaJpZM4JrHXL
.

avatar zero-24
zero-24 - comment - 24 Aug 2016

@waader how we get the sqlmode?

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Aug 2016

@zero-24 For "PDO (MySQL)" see #9457

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Aug 2016

@alikon i tested by manually performing the alter in mysql PDO strict mode and them installing the language in the backend.

I will test install too when i have time.

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Aug 2016

BTW just notice that if you enable the finder plugins you can't even save content in PDO Mysql Strict Mode! But that is not for this PR.
image

image

Pandora's box ...

We really need a db expert checking all this PDO MySql Strict things.

Update: Added issue #11771 for this

avatar alikon
alikon - comment - 24 Aug 2016

Are you ready to start an autumn of code ?

On 24 Aug 2016 1:31 pm, "andrepereiradasilva" notifications@github.com
wrote:

BTW just notice that if you enable the finder plugins you can't even save
content in PDO Mysql Strict Mode! But that is not for this PR.
[image: image]
https://cloud.githubusercontent.com/assets/9630530/17929146/833b91da-69f6-11e6-94c1-bc3d7e271fbc.png

[image: image]
https://cloud.githubusercontent.com/assets/9630530/17929149/864f9182-69f6-11e6-8867-456e7a3097f8.png

Pandora's box ...

We really need a db expert checking all this PDO MySql Strict things.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11763 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALFsbjgd8kRJQ8s9H5THN1SLksTmQ7Dks5qjCt0gaJpZM4JrHXL
.

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Aug 2016

Are you ready to start an autumn of code ?

ehhehe. Not me, i'm no DB expert, but this IMO should be solved for 4.0
Joomla is bypassing the strict mode (MySql 5.6.6+ default) because of lack of consistency in joomla DB.

avatar zero-24
zero-24 - comment - 24 Aug 2016

Maybe we should add a comment to the hack in the driver?

avatar waader
waader - comment - 24 Aug 2016

@alikon Yep, with three languages.

avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Aug 2016

@alikon can you confirm it works now?

avatar alikon
alikon - comment - 25 Aug 2016

If you install languages when install a fresh site don't work on pdo
strict mode... I'm working on a pr that solve the issue you reported about
finder plugin enabled too... I'll update you asap...

On 25 Aug 2016 11:22 am, "andrepereiradasilva" notifications@github.com
wrote:

@alikon can you confirm it works now?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

avatar andrepereiradasilva
andrepereiradasilva - comment - 25 Aug 2016

ok should work now in pdo strict mode now

avatar andrepereiradasilva andrepereiradasilva - change - 25 Aug 2016
Title
[SQL errors] Default values for custom_data and system_data
[SQL errors] When installing languages (backend/installation)
avatar andrepereiradasilva andrepereiradasilva - edited - 25 Aug 2016
avatar andrepereiradasilva andrepereiradasilva - change - 25 Aug 2016
Title
[SQL errors] When installing languages (backend/installation)
[SQL errors] When installing languages (backend/installation) in PDO Strict mode/Sql Azure
avatar andrepereiradasilva andrepereiradasilva - edited - 25 Aug 2016
avatar alikon
alikon - comment - 26 Aug 2016

still don't work on pdo strict-mode 10.1.8-MariaDB in this way
pdostrictmode1

did you miss my previous comment #11763 (comment) ?

i've submitted a fix to your branch andrepereiradasilva#67

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016
avatar alikon
alikon - comment - 26 Aug 2016

I think so, but I'll double check

avatar alikon
alikon - comment - 26 Aug 2016

i followed this path

  • downloaded the latest staging
  • installed with mysql no pdo
  • installed the com_patchtesterr (just in case i've not patchted correctly manually)
  • applyed PR #11763 with the last changes (as it is now)
  • dropped all tables in the database
  • deleted the configuration.php
  • added the strict mode to pdomysql.php at line 155
//$this->connection->query("SET @@SESSION.sql_mode = '';");
$this->connection->query("SET @@SESSION.sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';");
  • double checked that all changes in the PR #11763 are correctly in place
  • started a new installation with mysql pdo strict mode as a database
  • select the no data for basic multiligual install
  • double check that PR are corretclty applyied as db schema on changed tables checked with phpmyadmin
  • click on extra step install languages
  • got the sql error

strictpdo

this is what phpmyadmin report about DB
conf

if i repeat the same step but with andrepereiradasilva#67 applyied installation with multilgual enabled + 4 languages content menus etc goes OK

p.s.
PDO sould be considered as a different DB .... what is valid for other's DB is not valid with PDO
so this PR should be diveived in two parts one for MYSQL PDO (STRICT MODE) and one for MSSQL IMHO

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016

don't understand repeated the exact same steps you did and don't have any issue!

image

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016

could it be the mariadb version ?

avatar alikon
alikon - comment - 26 Aug 2016

andrè
it could be, but really is quite odd, what is your php version ?

  • can you try mine, just to have a wide spectrum of tests...
avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016

7.0.8

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016
avatar alikon
alikon - comment - 26 Aug 2016

like someone we both knows is used to say .... hmmm ;)

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Aug 2016

i mean how can you have a data has no default value error if the column clearly has now a default value ...

`data` text NOT NULL DEFAULT '',
avatar alikon
alikon - comment - 26 Aug 2016

maybe i've overlooked at the xml language files from the update site they don't have a data field tag
long debug session is needed....
sorry for repeating can you test with #67 instead ? (looking for a lowest common denominator)

avatar alikon
alikon - comment - 27 Aug 2016

i've digged more on this issue, here is what happens on my environment when i click on extra step install languages
pre

as you may notice the field data is not present in the INSERT field list
nor is present in the xml

<extension name="Armenian" element="pkg_hy-AM" type="package" version="3.4.4.1" detailsurl="https://update.joomla.org/language/details3/hy-AM_details.xml"/>

so why that field should have the NOT NULL constraint ?

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

Don't know. But the not null is on the 3 db systems

avatar joomla-cms-bot joomla-cms-bot - change - 30 Aug 2016
Category SQL Administration Components MS SQL Installation SQL Administration Components MS SQL Installation Libraries
avatar alikon
alikon - comment - 30 Aug 2016

tested successfully on mysql pdo strict mode and postgresql with php 5.5
@waader can you re-test on MSSQL

avatar alikon alikon - test_item - 30 Aug 2016 - Tested successfully
avatar alikon
alikon - comment - 30 Aug 2016

I have tested this item successfully on 6e11d41


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar waader waader - test_item - 30 Aug 2016 - Tested successfully
avatar waader
waader - comment - 30 Aug 2016

I have tested this item successfully on 6e11d41

Works with mssql!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar brianteeman brianteeman - change - 30 Aug 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 30 Aug 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar joomla-cms-bot joomla-cms-bot - change - 30 Aug 2016
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Aug 2016

@alikon i notice now you changed the update libraries in your PR (that was merged in this), did you test the extension updates work fine after that?

avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Aug 2016

@brianteeman sorry please remove RTC until @alikon confirm this.

avatar zero-24 zero-24 - change - 30 Aug 2016
Status Ready to Commit Pending
avatar zero-24
zero-24 - comment - 30 Aug 2016

Done :)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar joomla-cms-bot joomla-cms-bot - change - 30 Aug 2016
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 30 Aug 2016

The @zero-24 robot was faster


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar zero-24
zero-24 - comment - 30 Aug 2016

Hehe :)

avatar alikon
alikon - comment - 31 Aug 2016

i notice now you changed the update libraries in your PR (that was merged in this), did you test the extension updates work fine after that?

@andrepereiradasilva extension updates doesn't not work with PDO strict mode even without that change, i've made a fix for this scenario , see andrepereiradasilva#76 now you should be able to upgrade extensions, tested with com_patchtester and weblinks

avatar brianteeman brianteeman - change - 5 Sep 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 5 Sep 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2016
Labels Added: ?
avatar alikon
alikon - comment - 5 Sep 2016

@brianteeman since my last PR andrepereiradasilva#76 is not yet merged i suggest you to remove the RTC status....

avatar brianteeman
brianteeman - comment - 5 Sep 2016

Sorry I misread that comment

avatar brianteeman brianteeman - change - 5 Sep 2016
Status Ready to Commit Pending
Labels
avatar brianteeman
brianteeman - comment - 5 Sep 2016

Remove RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11763.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2016
Labels Removed: ?
avatar alikon
alikon - comment - 5 Sep 2016

@andrepereiradasilva can you evaluate my last one ...

avatar andrepereiradasilva andrepereiradasilva - change - 2 Jan 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2017
Category SQL Administration Components MS SQL Installation Libraries SQL Administration com_admin MS SQL Installation Libraries Components
avatar zero-24
zero-24 - comment - 4 Mar 2017

Closing as there is a new PR to fix it #14321

avatar zero-24 zero-24 - change - 4 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-04 09:08:02
Closed_By zero-24
avatar zero-24 zero-24 - close - 4 Mar 2017

Add a Comment

Login with GitHub to post a comment