Bug #89714

C-style comment in ext_tables.sql breaks following table definition

Added by Julian Hofmann 6 months ago. Updated 2 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-11-20
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

A C-style comment before a table definition will cause this table definition to be ignorend.

Example:

Definition of table1 will be ignored, while table2 is taken into account.

/*
 Some text (or older table defintions)
*/

#
# Table structure for table 'table1'
#
CREATE TABLE table1 (
    header varchar(255) DEFAULT '' NOT NULL,
    bodytext text
);

#
# Table structure for table 'table2'
#
CREATE TABLE table2 (
    header varchar(255) DEFAULT '' NOT NULL,
    bodytext text
);

Associated revisions

Revision 7adc8e07 (diff)
Added by Christian Eßl 2 months ago

[BUGFIX] Allow multiline comments in SqlReader

When using c-style multiline comments in the ext_tables.sql of an
extension, the SchemaMigrator would then ignore the subsequent
"CREATE TABLE" statement, because the SqlReader also read the multiline
comments into the statement array.
This patch fixes this behaviour.
Now the following comments are possible inside ext_tables.sql:

/*
Some comment text
more text
*/

/* Same line c-style comment */

/* More multiline
comments */

CREATE TABLE table1 (
header varchar(255) DEFAULT '' NOT NULL,
bodytext text
);

Resolves: #89714
Releases: master, 9.5
Change-Id: I49e687215d0b42d6ca5416c687fdbc19b44d237d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63951
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Tested-by: Daniel Goerz <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Daniel Goerz <>

History

#1 Updated by Gerrit Code Review 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63951

#2 Updated by Gerrit Code Review 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63951

#3 Updated by Gerrit Code Review 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63951

#4 Updated by Gerrit Code Review 2 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63911

#5 Updated by Christian Eßl 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Gerrit Code Review 2 months ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63911

Also available in: Atom PDF