Versions
Release : head of master branch
MySQL: 8.0.11
PHP: 7.2.4
Step to reproduce
1 Install piwigo on a newly created database without any prefix for table name
2 Add a picture
3 With menu on left got to administration page
Results
:heavy_check_mark:Step 1: OK
:heavy_check_mark:Step 2: OK
:x:Step 3: KO. Following error message appeared in the browser
Piwigo a rencontré une erreur non récupérable
[mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups' at line 2
SELECT COUNT(*)
FROM groups
;
#1 my_error D:\www_root\piwigo_src\include\dblayer\functions_mysqli.inc.php(147) #2 pwg_query D:\www_root\piwigo_src\admin\intro.php(190) #3 include D:\www_root\piwigo_src\admin.php(324)
**Versions**
Release : head of master branch
MySQL: 8.0.11
PHP: 7.2.4
**Step to reproduce**
1 Install piwigo on a newly created database without any prefix for table name
2 Add a picture
3 With menu on left got to administration page
**Results**
:heavy_check_mark:Step 1: OK
:heavy_check_mark:Step 2: OK
:x:Step 3: KO. Following error message appeared in the browser
Piwigo a rencontré une erreur non récupérable
[mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups' at line 2
SELECT COUNT(*)
FROM groups
;
#1 my_error D:\www_root\piwigo_src\include\dblayer\functions_mysqli.inc.php(147)
#2 pwg_query D:\www_root\piwigo_src\admin\intro.php(190)
#3 include D:\www_root\piwigo_src\admin.php(324)
<!-- github-sync-id:427411893 -->
@samwilson @pstimpel my opinion right now, is that Piwigo needs to escape column names with backtits everywhere, which has less "risky" impact than renaming all problematic columns.
Considering MySQL 8 is not yet very common, I think we can plan this important change for Piwigo 2.10 and not for 2.9. Do you both agree with that?
@samwilson @pstimpel my opinion right now, is that Piwigo needs to escape column names with backtits everywhere, which has less "risky" impact than renaming all problematic columns.
Considering MySQL 8 is not yet very common, I think we can plan this important change for Piwigo 2.10 and not for 2.9. Do you both agree with that?
<!-- github-comment-id:479804890 -->
I don't even really think there's much wrong with having column names the same as keywords. Better to not to, certainly, but no need to be a high priority to fix.
(And by the way, it's backticks, with a ck...)
Yep most definitely. :-)
I don't even really think there's much wrong with having column names the same as keywords. Better to not to, certainly, but no need to be a high priority to fix.
(And by the way, it's `backticks`, with a `ck`...)
<!-- github-comment-id:479827353 -->
I agree with the backticks, and with your timeline as well. Keep in mind we do not know about Oracles plans for Mysql. Maybe you will create kind of a sleeping nightmare. But yes, for th moment this should be OK
I agree with the backticks, and with your timeline as well. Keep in mind we do not know about Oracles plans for Mysql. Maybe you will create kind of a sleeping nightmare. But yes, for th moment this should be OK
<!-- github-comment-id:479846882 -->
LOL, I don't want to know what "backtit" might mean ;-) thank you for telling me it's backtick :-D
> (And by the way, it's `backticks`, with a `ck`...)
LOL, I don't want to know what "backtit" might mean ;-) thank you for telling me it's backtick :-D
<!-- github-comment-id:479895313 -->
@samwilson @pstimpel my opinion right now, is that Piwigo needs to escape column names with backtits everywhere, which has less "risky" impact than renaming all problematic columns.
Considering MySQL 8 is not yet very common, I think we can plan this important change for Piwigo 2.10 and not for 2.9. Do you both agree with that?
Yes sure.
It's important to plan it for easier troubleshooting and maintenance.
> @samwilson @pstimpel my opinion right now, is that Piwigo needs to escape column names with backtits everywhere, which has less "risky" impact than renaming all problematic columns.
>
> Considering MySQL 8 is not yet very common, I think we can plan this important change for Piwigo 2.10 and not for 2.9. Do you both agree with that?
Yes sure.
It's important to plan it for easier troubleshooting and maintenance.
<!-- github-comment-id:484391032 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Versions
Release : head of master branch
MySQL: 8.0.11
PHP: 7.2.4
Step to reproduce
1 Install piwigo on a newly created database without any prefix for table name
2 Add a picture
3 With menu on left got to administration page
Results
:heavy_check_mark:Step 1: OK
:heavy_check_mark:Step 2: OK
:x:Step 3: KO. Following error message appeared in the browser
Piwigo a rencontré une erreur non récupérable
[mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups' at line 2
SELECT COUNT(*)
FROM groups
;
#1 my_error D:\www_root\piwigo_src\include\dblayer\functions_mysqli.inc.php(147)
#2 pwg_query D:\www_root\piwigo_src\admin\intro.php(190)
#3 include D:\www_root\piwigo_src\admin.php(324)
OK, so "groups" is now a reserved keyword in MySQL 8 :-/ gonna have to escape it with backtits!
PR #922 is related (for the
rankkeyword).@samwilson @pstimpel my opinion right now, is that Piwigo needs to escape column names with backtits everywhere, which has less "risky" impact than renaming all problematic columns.
Considering MySQL 8 is not yet very common, I think we can plan this important change for Piwigo 2.10 and not for 2.9. Do you both agree with that?
Yep most definitely. :-)
I don't even really think there's much wrong with having column names the same as keywords. Better to not to, certainly, but no need to be a high priority to fix.
(And by the way, it's
backticks, with ack...)I agree with the backticks, and with your timeline as well. Keep in mind we do not know about Oracles plans for Mysql. Maybe you will create kind of a sleeping nightmare. But yes, for th moment this should be OK
LOL, I don't want to know what "backtit" might mean ;-) thank you for telling me it's backtick :-D
Yes sure.
It's important to plan it for easier troubleshooting and maintenance.