Skip Menu |
 

This queue is for tickets about the Tangram CPAN distribution.

Report information
The Basics
Id: 83713
Status: patched
Priority: 0/
Queue: Tangram

People
Owner: daveh [...] hodgkinson.org
Requestors: DLAMBLEY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.08_06
Fixed in: (no value)



Subject: Patch for mysql 5.5
Download (untitled) / with headers
text/plain 215b
Attached is a patch which makes deploys work in MySQL 5.5 and later. The syntax of create table changed between 5.0 and 5.5 to remove support for the TYPE clause, replaced with ENGINE. Best regards, Dave Lambley
Subject: mysql_55.patch
Download mysql_55.patch
text/x-diff 933b
Index: lib/Tangram/Relational/Engine.pm =================================================================== --- lib/Tangram/Relational/Engine.pm (revision 34980) +++ lib/Tangram/Relational/Engine.pm (revision 34981) @@ -429,6 +429,11 @@ my $do = _deploy_do($output); + my $TYPE = "TYPE"; + if ($output->{mysql_serverversion} && $output->{mysql_serverversion} > 50000) { + $TYPE = "ENGINE"; + } + foreach my $table (sort keys %$tables) { my $def = $tables->{$table}; @@ -466,7 +471,7 @@ ? ("PRIMARY KEY( $id_col )") : () ), ), - "\n) ".($type?" TYPE=$type":"")); + "\n) ".($type?" $TYPE=$type":"")); } @@ -488,7 +493,7 @@ unless $made_sequence{$sequence}++; } else { - $do->( <<SQL . ($table_type?" TYPE=$table_type":"") ); + $do->( <<SQL . ($table_type?" $TYPE=$table_type":"") ); CREATE TABLE $control ( layout INTEGER NOT NULL,
Pathc failed. Manually applied changes to: lib/Tangram/Relational/Schema.pm


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.