 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 7.1.228 Pro] - MySQL Formatting anomaly |
|
Applying formatting rule
 |
 |
ALTER TABLE ...
...
,...
;
|
to
 |
 |
ALTER TABLE `ertekesites`.`eladasok` ADD CONSTRAINT eladasok_ibfk_1 FOREIGN KEY `eladasok_ibfk_1`(`id_adougyi_nap`) REFERENCES `ertekesites`.`adougyi_napok`(`id_adougyi_nap`) ON DELETE CASCADE ON UPDATE CASCADE`;
|
will result in corrupted code:
 |
 |
ALTER TABLE `ertekesites`.`eladasok` ADD CONSTRAINT eladasok_ibfk_1 FOREIGN KEY `eladasok_ibfk_1`(`id_adougyi_nap`) REFERENCES `ertekesites`.`adougyi_napok`(`id_adougyi_nap`)
ON DELETE CASCADE ON UPDATE`) ON DELETE CASCADE ON UPDATE CASCADE`
;
|
|
|
Mon Dec 01, 2014 11:27 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
This weird effect is a result of the extra ` symbol just before the ending;
If you remove that extra `, then formatting of
 |
 |
ALTER TABLE `ertekesites`.`eladasok` ADD CONSTRAINT eladasok_ibfk_1 FOREIGN KEY `eladasok_ibfk_1`(`id_adougyi_nap`) REFERENCES `ertekesites`.`adougyi_napok`(`id_adougyi_nap`) ON DELETE CASCADE ON UPDATE CASCADE; |
statement produces
 |
 |
ALTER TABLE `ertekesites`.`eladasok` ADD CONSTRAINT eladasok_ibfk_1 FOREIGN KEY
`eladasok_ibfk_1`(`id_adougyi_nap`) REFERENCES `ertekesites`.`adougyi_napok`(`id_adougyi_nap`)
ON DELETE CASCADE ON UPDATE CASCADE; |
This result is valid. Note that the lines are wrapped because of a different line wrapping rule "Line Length for Code Wrapping"
|
|
Tue Dec 02, 2014 2:39 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Oh, dear, I must have been very tired letting that tiny grave accent to escape my sight :) Sorry for the false alarm.
|
|
Tue Dec 02, 2014 4:24 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|