Upon installing Views Union, I got these three SQL syntax errors:

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 '' at line 1 query: DROP INDEX klwc_views_union_parent_idx in /home/.slick/klwc/kingdomlifeworshipcenter.org/includes/database.mysql.inc on line 172.

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 '' at line 1 query: DROP INDEX klwc_views_union_child_idx in /home/.slick/klwc/kingdomlifeworshipcenter.org/includes/database.mysql.inc on line 172.

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 'SEQUENCE klwc_views_union_id_seq' at line 1 query: DROP SEQUENCE klwc_views_union_id_seq in /home/.slick/klwc/kingdomlifeworshipcenter.org/includes/database.mysql.inc on line 172.

I don't know a lot about PHP or SQL, but I'm willing to try to provide any helpful information that I can. I removed Union Views from my production site, but I would be willing to experiment on my personal site. It's hosted with the same company, so the configuration will be the same.

Comments

fm’s picture

I've gotten the same error, without a db prefix.

Anonymous’s picture

It appears that you guys are using postgresql, is that true?

Verily, I have not tested in a postgesql environment. This is probably something I will need to fix.

fm’s picture

No, sir. I am using MySQL 5.0.37 and PHP 5.2.1.

sliiiiiide’s picture

I'm also getting these errors, using:

PHP 4.3.9
MySQL 4.1.12

This module would really satisfy me.

dmitrig01’s picture

Easy fix: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/views_union...
If you look, after ) /*!40100 DEFAULT CHARACTER SET utf8 */");
there's not break;
That means it'll go on to PG. Also, you'll want to put the DROP statements in hook_uninstall.

kevin francis’s picture

Status: Active » Needs review
StatusFileSize
new40 bytes

Alright I've uh made a diff with the additions to views_union.install that allows it to install and work properly. It's just the addition of two breaks (as by dmitrig01 above) but since I wanted to confirm that this fixes the problem, I decided to follow up.

kevin francis’s picture

StatusFileSize
new646 bytes

Disregard my earlier patch, I forgot the -up flag. Use this one, or just type it in manually :)

Anonymous’s picture

Status: Needs review » Fixed

Oh. I wonder how I didn't get that. Probably, I installed it on my system, then later felt bad for the postgres people, so I added the postgres section clumsily and didn't check to make sure the installer still worked.

Anyway, I applied that patch, and added an implementation of hook_uninstall. How's it looking now?

Thanks.

Bevan’s picture

Status: Fixed » Needs work

I get this bug with the latest release on php5 with MySQL 5. Did this get fixed and commited?

Anonymous’s picture

Status: Needs work » Closed (fixed)

This is fixed in the 1.0 release.