-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Feature: allow choosing innoDb vs MyIsam engine for MYSQL during installation #1043
New Feature: allow choosing innoDb vs MyIsam engine for MYSQL during installation #1043
Conversation
…rol-label' is auto-generated
Ok now. |
@@ -557,6 +557,11 @@ public function beforeActivate() | |||
{ | |||
if (!$this->api->tableExists($this, 'log')) | |||
{ | |||
$options = ''; | |||
if (Yii::app()->db->driverName == 'mysqli' || Yii::app()->db->driverName == 'mysql') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more of something in API ;) : api->createTable function (but this api is … so … so … light)
I just finished with testing.
There is also this error when trying to activate a survey with many columns:
It is obvious those errors are related to innoDB limitation of having too many columns. In such case, import/activation should be aborted and warning should be shown to user. |
InnoDB don't send exception here ? LimeSurvey/application/helpers/admin/activate_helper.php Lines 457 to 466 in 99d396d
|
Just checkout :
But seems all my setup wads broken now … maybe an issue in DBversion … |
Thanks for testing! Maybe you can add some test files to the Did you try with debugging = 0, was it the same? |
When activating, it shows nice warning message when debug=0. |
Column limit does not apply to the BLOB and TEXT type. |
@dominikvitt |
@Shnoulle can you check what is the status of the engine variables (see top of page):
your issue sounds like related to innodb_large_prefix. |
I just checkout my current develop with your's (i want to test set innodb after install too) Currently : even with core develop : i have issue with my master DB to upgrade to develop. |
I would test now upgrading from master to develop. |
Ok , i check too (maybe must do a |
@Shnoulle Database problem is fixed now, you can try again. |
Current develop version is already using TEXT db fields for all response columns, so we can't solve it like that. Let it stay for now as it is. @TonisOrmisson Can you add check to see if table is actually created while importing .lsa file? |
created a new survey with this branch, activated and created some responses, exported lsa and imported as new survey. All relevant tables were created. responses, timings, tokens. |
How does that work with features like filtering statistics by date or calculating e.g. mean or average values at statistics and other features? Don't they rely on a proper DB field type? |
Really ? And this was merged in develop … for alpha version … the DB column type is the most complicated system to move to QuestionObject … don't do it at start of devlopment seem realy an issue in my opinion … |
All features you mentioned don't rely on specific DB field type and data would be read the same regardless of DB field type. So, there shouldn't be any different behaviour when using TEXT DB field type. |
Please try to create a survey containing large number of response columns (e.g. over 100 or 200) and redo all steps to test it. |
|
A survey with 10 000 column must broke for all DB ;) (else : tell me the DB to be used for such system) |
Formerly opened form master #977, now for develop
Some notes:
in order for innoDb to work one needs:
otherwise you will get the "Error 1071: Specified key was too long; max key length is 767 bytes" for the text indexes, (Error 1071: Specified key was too long; max key length is 767 bytes)
I enabled this for travis
https://github.com/LimeSurvey/LimeSurvey/compare/develop...TonisOrmisson:develop-innodb?expand=1#diff-354f30a63fb0907d4ad57269548329e3R45
and checking of this will be done in installer validation here
https://github.com/LimeSurvey/LimeSurvey/compare/develop...TonisOrmisson:develop-innodb?expand=1#diff-12a8fc159f48cb97e97609f6c43aab0aR258
Did some major changes in the installer logic.
Why? because I needed to check the Innodb settings status in the model validation: so the dbConnection needed to move from the controller to the Model. And so all of the connection related things were moved to model. Controller got much more cleaner and is now not doing things that logically should not be there.
Also cleaned up the view along that since there was code that should not be in the view.
Tests:
I enabled separate set of tests for InnoDB and MyIsam. So the whole test set runs both ways now.
Also added PHP 7.2 to the matrix.
... I think we should also use the pgsql for testing on travis. As far as I understand this is also included for travis so I would use an ENV DBTYPE to run test matrix also on available non-mysql options.
I have tested this manually also during the work, but since there is a lot of changes here I would ask for you to review the code as well as also help to test manually. Especially for MSSQL that I do not have and is not tested against!