?
avatar wojsmol
wojsmol
25 Dec 2015

IMHO file https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.4.0-2014-09-16.sql contains MySQL syntax errors :
is

ALTER TABLE `#__redirect_links` ADD header smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY new_url varchar(255);

should be

ALTER TABLE `#__redirect_links` ADD `header` smallint(3) NOT NULL DEFAULT 301;
ALTER TABLE `#__redirect_links` MODIFY `new_url` varchar(255);

related: #6333

CC: @wilsonge

avatar wojsmol wojsmol - open - 25 Dec 2015
avatar wojsmol wojsmol - change - 25 Dec 2015
Title
Sintax errors in file /com_admin/sql/updates/mysql/3.4.0-2014-09-16.sql
Syntax errors in file /com_admin/sql/updates/mysql/3.4.0-2014-09-16.sql
avatar wilsonge
wilsonge - comment - 26 Dec 2015

Sounds good to me - can you do a PR for this - see https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

Else ping me again next week when I'll have time to do it myself (I'll try and remember but got a lot going on at the moment with holidays + family stuff)

avatar wojsmol wojsmol - reference | d0c5cd7 - 26 Dec 15
avatar wojsmol
wojsmol - comment - 26 Dec 2015

PR #8788

avatar ggppdk
ggppdk - comment - 26 Dec 2015

These will not yield a syntax error,
only

  • reserved words and
  • column names with special characters (e.g. space) or UTF encodings are required to be quoted/escaped,

of course it is better to quote the column names

  • furthermore i tested and it seems that the class JSchemaChangeitemMysql, can handle non-quoted column names

Real reason is:
that JSchemaChangeitemMysql cannot handle

... ADD `columnname` ...

it expects "ADD COLUMN columnname", so please update your PR to make it like:

... ADD COLUMN `columnname`  ...
avatar wojsmol
wojsmol - comment - 26 Dec 2015

@ggppdk PR fixed #8788

avatar brianteeman brianteeman - close - 26 Dec 2015
avatar Bakual
Bakual - comment - 26 Dec 2015

Closing as we have a PR

avatar Bakual Bakual - change - 26 Dec 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-12-26 12:39:24
Closed_By Bakual
avatar Bakual Bakual - close - 26 Dec 2015
avatar brianteeman brianteeman - change - 8 Mar 2016
Labels Added: ?

Add a Comment

Login with GitHub to post a comment