Skip to content
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

Mysql 8 Database Error #1

Open
elearningdienst opened this issue May 25, 2020 · 2 comments
Open

Mysql 8 Database Error #1

elearningdienst opened this issue May 25, 2020 · 2 comments

Comments

@elearningdienst
Copy link

On mysql 8 get an Error while sending the feedback:

mysql --version
mysql Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

grafik

Questions are OK:

grafik

grafik

Any hints what to do?

@elearningdienst
Copy link
Author

I figured out the problem: The VARCHAR variable in the dbsetup.php query is too big:

	$db->query('CREATE TABLE presentation_question_responses (
		id INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
		feedbackid INT NOT NULL,
		sequenceNumber INT NOT NULL,
		response VARCHAR(35000)
		)') or die(translate('dberr') . '14717');

I changed 35000 to 15000 and it worked fine. So all database tables are there. No Database errors while giving feedback.

@lgommans
Copy link
Owner

lgommans commented May 25, 2020

Thanks for the feedback! It's a good point, I actually started a new PHP+database project two weeks ago for the first time in forever, and found out that my UTF-8 varchar columns can actually only be about 21 thousand bytes. I didn't realize this project would have that bug -- it didn't manifest in my original setup from 2016 since I (apparently) used the latin1 character set back then (I assume that used to be the default).

Do you want to create a pull request so that your contribution ends up in the commit log of this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants