Public bug reported:

http://<your url>/admin/site/licenses.php fails on a mysql installation
because the EXCEPT clause is not in mysql.

Instead of except, something like "LEFT JOIN, IS NULL" needs to be used.

[WAR] c9 (lib/errors.php:749) Failed to get a recordset: mysql error: [1064: 
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 'EXCEPT
    SELECT name FROM artefact_license' at line 2] in EXECUTE("
    SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
    EXCEPT
    SELECT name FROM artefact_license
")
Command was:
    SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
    EXCEPT
    SELECT name FROM artefact_license
Call stack (most recent first):

    log_message("Failed to get a recordset: mysql error: [1064: You...", 8, 
true, true) at /var/www/mahara-mysql/code/htdocs/lib/errors.php:109
    log_warn("Failed to get a recordset: mysql error: [1064: You...") at 
/var/www/mahara-mysql/code/htdocs/lib/errors.php:749
    SQLException->__construct("Failed to get a recordset: mysql error: [1064: 
You...") at /var/www/mahara-mysql/code/htdocs/lib/dml.php:846
    get_column_sql(" SELECT license FROM artefact WHERE license IS...") at 
/var/www/mahara-mysql/code/htdocs/admin/site/licenses.php:57

[WAR] c9 (lib/dml.php:846) Failed to get a recordset: mysql error: [1064: 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 'EXCEPT
    SELECT name FROM artefact_license' at line 2] in EXECUTE("
    SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
    EXCEPT
    SELECT name FROM artefact_license
")
Command was:
    SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
    EXCEPT
    SELECT name FROM artefact_license
Call stack (most recent first):

    get_column_sql(" SELECT license FROM artefact WHERE license IS...")
at /var/www/mahara-mysql/code/htdocs/admin/site/licenses.php:57

Mahara: Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug 
in the system

** Affects: mahara
     Importance: Critical
         Status: New


** Tags: mysql

** Description changed:

  http://<your url>/admin/site/licenses.php fails on a mysql installation
  because the EXCEPT clause is not in mysql.
  
  Instead of except, something like "LEFT JOIN, IS NULL" needs to be used.
  
- [WAR] 74 (lib/errors.php:749) Failed to get a recordset: mysql error: [1064: 
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 'EXCEPT
+ [WAR] c9 (lib/errors.php:749) Failed to get a recordset: mysql error: [1064: 
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 'EXCEPT
      SELECT name FROM artefact_license' at line 2] in EXECUTE("
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  ")
  Command was:
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  Call stack (most recent first):
  
      log_message("Failed to get a recordset: mysql error: [1064: You...", 8, 
true, true) at /var/www/mahara-mysql/code/htdocs/lib/errors.php:109
      log_warn("Failed to get a recordset: mysql error: [1064: You...") at 
/var/www/mahara-mysql/code/htdocs/lib/errors.php:749
      SQLException->__construct("Failed to get a recordset: mysql error: [1064: 
You...") at /var/www/mahara-mysql/code/htdocs/lib/dml.php:846
      get_column_sql(" SELECT license FROM artefact WHERE license IS...") at 
/var/www/mahara-mysql/code/htdocs/admin/site/licenses.php:57
  
- [WAR] 74 (lib/dml.php:846) Failed to get a recordset: mysql error: [1064: 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 'EXCEPT
+ [WAR] c9 (lib/dml.php:846) Failed to get a recordset: mysql error: [1064: 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 'EXCEPT
      SELECT name FROM artefact_license' at line 2] in EXECUTE("
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  ")
  Command was:
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  Call stack (most recent first):
  
      get_column_sql(" SELECT license FROM artefact WHERE license IS...")
  at /var/www/mahara-mysql/code/htdocs/admin/site/licenses.php:57
+ 
+ Mahara: Site unavailable
+ A nonrecoverable error occurred. This probably means you have encountered a 
bug in the system

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/1131508

Title:
  artefact licences feature not configurable on mysql

Status in Mahara ePortfolio:
  New

Bug description:
  http://<your url>/admin/site/licenses.php fails on a mysql
  installation because the EXCEPT clause is not in mysql.

  Instead of except, something like "LEFT JOIN, IS NULL" needs to be
  used.

  [WAR] c9 (lib/errors.php:749) Failed to get a recordset: mysql error: [1064: 
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 'EXCEPT
      SELECT name FROM artefact_license' at line 2] in EXECUTE("
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  ")
  Command was:
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  Call stack (most recent first):

      log_message("Failed to get a recordset: mysql error: [1064: You...", 8, 
true, true) at /var/www/mahara-mysql/code/htdocs/lib/errors.php:109
      log_warn("Failed to get a recordset: mysql error: [1064: You...") at 
/var/www/mahara-mysql/code/htdocs/lib/errors.php:749
      SQLException->__construct("Failed to get a recordset: mysql error: [1064: 
You...") at /var/www/mahara-mysql/code/htdocs/lib/dml.php:846
      get_column_sql(" SELECT license FROM artefact WHERE license IS...") at 
/var/www/mahara-mysql/code/htdocs/admin/site/licenses.php:57

  [WAR] c9 (lib/dml.php:846) Failed to get a recordset: mysql error: [1064: 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 'EXCEPT
      SELECT name FROM artefact_license' at line 2] in EXECUTE("
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  ")
  Command was:
      SELECT license FROM artefact WHERE license IS NOT NULL and license <> ''
      EXCEPT
      SELECT name FROM artefact_license
  Call stack (most recent first):

      get_column_sql(" SELECT license FROM artefact WHERE license
  IS...") at /var/www/mahara-
  mysql/code/htdocs/admin/site/licenses.php:57

  Mahara: Site unavailable
  A nonrecoverable error occurred. This probably means you have encountered a 
bug in the system

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1131508/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to