Forums | Mahara Community

Support /
Mahara 1.3 upgrade Databse Problem


Ali Hastie's profile picture
Posts: 145

14 September 2010, 4:28

Hi

I am trying to upgrade our Mahara from 1.2.6 > 1.3 and receive the error below:

Could not execute command: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP

Call stack (most recent first):
  • execute_sql("ALTER TABLE {view} ADD COLUMN submittedtime TIMEST...") at /htdocs/lib/db/upgrade.php:1439
  • xmldb_core_upgrade("2009111017") at /htdocs/lib/upgrade.php:301
  • upgrade_core(object(stdClass)) at /htdocs/admin/upgrade.json.php:93

I have had a look at the MYSQL view table submittedtime column has this for every view:

0000-00-00 00:00:00

Thanks

Ali

anonymous profile picture
Account deleted
Posts: 808

14 September 2010, 19:28

Ali,

It sounds like you already had a submittedtime column on the view table before the upgrade, and the command failed (it can't create a column that already exists).

A stock 1.2.6 db should not have that column.

Was this the first time you tried the upgrade?  If you tried twice, and this is the error you got the second time around, then we need to find out what the error was the first time.  The best way to do this is to restore the original 1.2.6 db, try the upgrade again, and see where you get to.

anonymous profile picture
Account deleted
Posts: 808

14 September 2010, 19:39

Oops, it looks like the upgrade also created that submittedtime column as not null, which is wrong, it should be nullable.

I'll fix that, and write another upgrade to correct it. (But we should still try to track down the cause of your original error).

Ali Hastie's profile picture
Posts: 145

15 September 2010, 4:01

Hi Richard

Yes the above error was the second upgrade attempt. Here is the first error:

Could not execute command: CREATE TABLE artefact_comment_deletedby ( name VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (name) )ENGINE=innodb

Call stack (most recent first):
  • execute_sql("CREATE TABLE mdl_artefact_comment_deletedby ( ...", true) at htdocs/lib/dml.php:1406
  • execute_sql_arr(array(size 2)) at htdocs/lib/ddl.php:566
  • install_from_xmldb_file("/data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/...") at htdocs/lib/upgrade.php:363
  • upgrade_plugin(object(stdClass)) at htdocs/lib/db/upgrade.php:1514
  • xmldb_core_upgrade("2009111017") at htdocs/lib/upgrade.php:301
  • upgrade_core(object(stdClass)) at htdocs/admin/upgrade.json.php:93

Many thanks

Ali

 

anonymous profile picture
Account deleted
Posts: 808

15 September 2010, 17:13

Ali

I really need to find out why it couldn't create that table, and that output doesn't say why.  Is there any more information in your error log, perhaps a MySQL error code?

Alternatively, could you try just pasting that SQL command directly into your mysql client (in the same database) and let me know what error you get?

On my copy of MySQL that command succeeds, so there's something in your setup that's different from mine.

Thanks,

Richard.

Ali Hastie's profile picture
Posts: 145

16 September 2010, 5:55

Hi Richard

Sorry I didnt provide any error logs. I psted in the command for the first error and it worked, which then reverted to the sunmittedtime TIMESTAMP issue. I also typed in the command to ALTER the view table but still stalls at the error.

below is the error logs for the 'Could not execute command: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP'

----START OF ERROR LOG FOR THE ABOVE----

[DBG] 61 (lib/mahara.php:1300) Field mailssent exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 61 (lib/mahara.php:1300) Field mailsbounced exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 61 (lib/mahara.php:1300) Field theme exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 61 (lib/dml.php:166) mysql error: [1060: Duplicate column name 'submittedtime'] in adodb_throw(ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, ), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 [DBG] 61 (lib/dml.php:166) Command was: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 [WAR] 61 (lib/errors.php:743) Could not execute command: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


Call stack (most recent first):, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_message("Could not execute command: ALTER TABLE "mdl_view" ...", 8, true, true) at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/errors.php:109, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_warn("Could not execute command: ALTER TABLE "mdl_view" ...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/errors.php:743, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* SQLException->__construct("Could not execute command: ALTER TABLE "mdl_view" ...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/dml.php:168, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* execute_sql("ALTER TABLE {view} ADD COLUMN submittedtime TIMEST...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/db/upgrade.php:1439, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


  * xmldb_core_upgrade("2009111017") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/upgrade.php:301, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


   * upgrade_core(object(stdClass)) at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/admin/upgrade.json.php:93, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 , referer: http://testmahara.barony.ac.uk/admin/upgrade.php


1a (lib/mahara.php:1300) Field mailssent exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 1a (lib/mahara.php:1300) Field mailsbounced exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 [DBG] 1a (lib/mahara.php:1300) Field theme exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 1a (lib/dml.php:166) mysql error: [1060: Duplicate column name 'submittedtime'] in adodb_throw(ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, ), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 1a (lib/dml.php:166) Command was: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] 1a (lib/errors.php:743) Could not execute command: ALTER TABLE "mdl_view" ADD COLUMN submittedtime TIMESTAMP, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


Call stack (most recent first):, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_message("Could not execute command: ALTER TABLE "mdl_view" ...", 8, true, true) at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/errors.php:109, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_warn("Could not execute command: ALTER TABLE "mdl_view" ...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/errors.php:743, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* SQLException->__construct("Could not execute command: ALTER TABLE "mdl_view" ...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/dml.php:168, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * execute_sql("ALTER TABLE {view} ADD COLUMN submittedtime TIMEST...") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/db/upgrade.php:1439, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* xmldb_core_upgrade("2009111017") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/upgrade.php:301, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* upgrade_core(object(stdClass)) at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/admin/upgrade.json.php:93, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[Thu Sep 16 11:26:17 2010] [error] [client 10.10.10.18] , referer: http://testmahara.barony.ac.uk/admin/upgrade.php

------END OF ERROR LOG-----

Something else strange has happened, When I try and go to Site Administration I receive the error below:

Fatal error: Cannot redeclare add_feedback_form_validate() (previously declared in /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/artefact/comment/lib.php:752) in /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/view.php on line 2828

So i traced the View which has a single comment attached and tried to delete the view (it was my view so it's ok) but reported back stating 'nonrecoverable error occured. This probably means you have encountered a bug in the system'

----START OF ERROR LOG FOR THE ABOVE----

[WAR] 56 (lib/errors.php:738) Failed to get a recordset: mysql error: [1451: Cannot delete or update a parent row: a foreign key constraint fails (temp file operation failed)] in adodb_throw(DELETE FROM "mdl_view"  WHERE "id" = '211' , ), referer: http://mahara.barony.ac.uk/view/delete.php?id=211

[WAR] 56 (lib/errors.php:738) Command was: DELETE FROM "mdl_view"  WHERE "id" = ?  and values was (211), referer: http://mahara.barony.ac.uk/view/delete.php?id=211


Call stack (most recent first):, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* log_message("Failed to get a recordset: mysql error: [1451: Can...", 8, true, true) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/errors.php:111, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* log_warn("Failed to get a recordset: mysql error: [1451: Can...") at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/errors.php:738, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* SQLException->__construct("Failed to get a recordset: mysql error: [1451: Can...") at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/dml.php:917, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


 * delete_records("view", "id", "211") at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/view.php:508, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* View->delete() at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/view/delete.php:78, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


  * deleteview_submit(object(Pieform), array(size 2)) at Unknown:0, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


  * call_user_func_array("deleteview_submit", array(size 2)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:430, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


  * Pieform->__construct(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:170, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


 * Pieform::process(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:71, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* pieform(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/view/delete.php:67, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


[WAR] 56 (lib/dml.php:917) Failed to get a recordset: mysql error: [1451: Cannot delete or update a parent row: a foreign key constraint fails (temp file operation failed)] in adodb_throw(DELETE FROM "mdl_view"  WHERE "id" = '211' , ), referer: http://mahara.barony.ac.uk/view/delete.php?id=211


[WAR] 56 (lib/dml.php:917) Command was: DELETE FROM "mdl_view"  WHERE "id" = ?  and values was (211), referer: http://mahara.barony.ac.uk/view/delete.php?id=211


 Call stack (most recent first):, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


 * delete_records("view", "id", "211") at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/view.php:508, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


 * View->delete() at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/view/delete.php:78, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* deleteview_submit(object(Pieform), array(size 2)) at Unknown:0, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* call_user_func_array("deleteview_submit", array(size 2)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:430, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* Pieform->__construct(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:170, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* Pieform::process(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/lib/pieforms/pieform.php:71, referer: http://mahara.barony.ac.uk/view/delete.php?id=211


* pieform(array(size 4)) at /data/httpdata/v-hosts/mahara.barony.ac.uk/htdocs/view/delete.php:67, referer: http://mahara.barony.ac.uk/view/delete.php?id=211
 , referer: http://mahara.barony.ac.uk/view/delete.php?id=211

-----END OF ERROR LOG----

I am wondering if these are related?

Many thanks for your help Richard.

Ali

anonymous profile picture
Account deleted
Posts: 808

16 September 2010, 16:45

Hi Ali,

The submittedtime bug is fixed (https://bugs.launchpad.net/mahara/+bug/638550) and I'll try to get a new bugfix release today.  I was holding off in the hope that I could get the fix for the deletedby thing in there too, but it seems to be a bit elusive at the moment.

I'm afraid that with mysql once an upgrade has failed the first time, all bets are off because it's quite likely that your database has been left in an inconsistent state (Mysql won't roll back after failed upgrades).  The only decent solution is to restore your db from before the upgrade, and run it again using a hopefully fixed version of the code.

The error you're getting with the redeclaration of "add_feedback_form_validate" is a little bit worrying, because that function was moved between 1.2 and 1.3 (from lib/view.php to artefact/comment/lib.php).  If you have two copies of it, then it's possible that you didn't completely replace the old 1.2 code when you installed the 1.3 code.

So you should restore your old 1.2.6 database (& dataroot), then completely replace your code with the latest 1.3 and try the upgrade again.  (You can either generate a new code tarball from http://gitorious.org/mahara/mahara/archive-tarball/1.3_STABLE or wait for an official 1.3.1 release tarball).

R.

Ali Hastie's profile picture
Posts: 145

19 September 2010, 17:22

Thanks Richard

I reverted the database and dataroot back to 1.2.6 and used the tarball you recommend but produced the follow error:

Could not execute command: ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_aut_fk FOREIGN KEY (author) REFERENCES mdl_usr (id)

Now I am worried, something strange with our database I think, though I am not a MYSQL expert.

Was hoping to have 1.3 installed to be used for our College's Personal Learning Plans by using the new My Plans and My Collections this week. Saying this, on our other Mahara the upgrade installation (school students) everything went smoothly.

I am a little unsure what to do now, I will try the newly released 1.3.1 or 'possibly' start this install from scratch with a new database with 1.3 installed Frown

Many thanks for your help,

Ali

anonymous profile picture
Account deleted
Posts: 808

19 September 2010, 18:39

Hi Ali,

The 1.3.1 download is available now, but I'm afraid it won't behave any differently from the tarball you used.

I'm pretty keen to make sure these upgrades get fixed, so if you do have time to help me track this one down, I'd appreciate it.  If we can get it fixed it will be helpful for others too.

I don't know why that command failed, but there will be something in your error log that has additional information to what's being displayed on screen.  (For example, stuff like the "mysql error: [1060: Duplicate column name ..." in your previous error log).

So your error log will definitely be useful on the first upgrade attempt after restoring your 1.2.6 db.  If you attempt the upgrade a second time with mysql there are a bunch of new, different errors that are generally not very useful.

R.

Ali Hastie's profile picture
Posts: 145

20 September 2010, 3:57

Hi

Ok, im up for helping others and myself! This time the first error was this on the upgrade from 1.2.6 > 1.3.1

Could not execute command: CREATE TABLE mdl_artefact_comment_deletedby ( name VARCHAR(50) NOT NULL, CONSTRAINT PRIMARY KEY (name) )ENGINE=innodb

Call stack (most recent first):
  • execute_sql("CREATE TABLE mdl_artefact_comment_deletedby ( ...", true) at /htdocs/lib/dml.php:1406
  • execute_sql_arr(array(size 2)) at /htdocs/lib/ddl.php:566
  • install_from_xmldb_file("/data/httpdata/v-hosts/testmahara.barony.ac.uk/htd...") at /htdocs/lib/upgrade.php:363
  • upgrade_plugin(object(stdClass)) at /htdocs/lib/db/upgrade.php:1517
  • xmldb_core_upgrade("2009111017") at /htdocs/lib/upgrade.php:301
  • upgrade_core(object(stdClass)) at /htdocs/admin/upgrade.json.php:93

----START OF ERROR LOG-----

[DBG] 45 (lib/db/upgrade.php:1355) Upgrade 2010011300: rebuild_artefact_parent_cache_dirty failed., referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) mysql error: [1050: Table 'mdl_artefact_comment_deletedby' already exists] in adodb_throw(CREATE TABLE mdl_artefact_comment_deletedby (, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166)     name VARCHAR(50) NOT NULL,, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) CONSTRAINT  PRIMARY KEY (name), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) )ENGINE=innodb, ), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) Command was: CREATE TABLE mdl_artefact_comment_deletedby (, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166)     name VARCHAR(50) NOT NULL,, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) CONSTRAINT  PRIMARY KEY (name), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] 45 (lib/dml.php:166) )ENGINE=innodb, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] 45 (lib/errors.php:743) Could not execute command: CREATE TABLE mdl_artefact_comment_deletedby (, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] 45 (lib/errors.php:743)     name VARCHAR(50) NOT NULL,, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] 45 (lib/errors.php:743) CONSTRAINT  PRIMARY KEY (name), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] 45 (lib/errors.php:743) )ENGINE=innodb, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 Call stack (most recent first):, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_message("Could not execute command: CREATE TABLE mdl_artefa...", 8, true, true) at /htdocs/lib/errors.php:109, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * log_warn("Could not execute command: CREATE TABLE mdl_artefa...") at /htdocs/lib/errors.php:743, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* SQLException->__construct("Could not execute command: CREATE TABLE mdl_artefa...") at /htdocs/lib/dml.php:168, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* execute_sql("CREATE TABLE mdl_artefact_comment_deletedby (, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[Mon Sep 20 09:28:40 2010] [error] [client 10.10.10.18]     ...", true) at /htdocs/lib/dml.php:1406, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* execute_sql_arr(array(size 2)) at /htdocs/lib/ddl.php:566, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * install_from_xmldb_file("/data/httpdata/v-hosts/testmahara.barony.ac.uk/htd...") at /htdocs/lib/upgrade.php:363, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * upgrade_plugin(object(stdClass)) at /htdocs/lib/db/upgrade.php:1517, referer: http://testmahara.barony.ac.uk/admin/upgrade.php

* xmldb_core_upgrade("2009111017") at /htdocs/lib/upgrade.php:301, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* upgrade_core(object(stdClass)) at /htdocs/admin/upgrade.json.php:93, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


, referer: http://testmahara.barony.ac.uk/admin/upgrade.php

---END OF ERROR LOG---

I refreshed the browser (i know that the database will be unstable on first error) and produced this error:

Could not execute command: ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_aut_fk FOREIGN KEY (author) REFERENCES mdl_usr (id)

Call stack (most recent first):
  • execute_sql("ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_a...", true) at /htdocs/lib/dml.php:1406
  • execute_sql_arr(array(size 1), true, true) at /htdocs/lib/ddl.php:972
  • add_key(object(XMLDBTable), object(XMLDBKey)) at /htdocs/lib/db/upgrade.php:1487
  • xmldb_core_upgrade("2009111017") at /data/httpdata/v-hosts/testmahara.barony.ac.uk/htdocs/lib/upgrade.php:301
  • upgrade_core(object(stdClass)) at /htdocs/admin/upgrade.json.php:93

----START OF ERROR LOG-----

[DBG] ae (lib/mahara.php:1300) Field mailssent exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] ae (lib/mahara.php:1300) Field mailsbounced exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] ae (lib/mahara.php:1300) Field theme exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] ae (lib/mahara.php:1300) Field submittedtime exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


DBG] ae (lib/mahara.php:1300) Field author exists. Create skipped, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] ae (lib/dml.php:166) mysql error: [1005: Can't create table 'testmahara.#sql-4ac_d69fb' (errno: 121)] in adodb_throw(ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_aut_fk FOREIGN KEY (author) REFERENCES mdl_usr (id), ), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[DBG] ae (lib/dml.php:166) Command was: ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_aut_fk FOREIGN KEY (author) REFERENCES mdl_usr (id), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[WAR] ae (lib/errors.php:743) Could not execute command: ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_aut_fk FOREIGN KEY (author) REFERENCES mdl_usr (id), referer: http://testmahara.barony.ac.uk/admin/upgrade.php


[Mon Sep 20 09:44:23 2010] [error] [client 10.10.10.18] Call stack (most recent first):, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* log_message("Could not execute command: ALTER TABLE mdl_artefac...", 8, true, true) at /htdocs/lib/errors.php:109, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * log_warn("Could not execute command: ALTER TABLE mdl_artefac...") at /htdocs/lib/errors.php:743, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * SQLException->__construct("Could not execute command: ALTER TABLE mdl_artefac...") at /htdocs/lib/dml.php:168, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* execute_sql("ALTER TABLE mdl_artefact ADD CONSTRAINT mdl_arte_a...", true) at /htdocs/lib/dml.php:1406, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


* execute_sql_arr(array(size 1), true, true) at /htdocs/lib/ddl.php:972, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * add_key(object(XMLDBTable), object(XMLDBKey)) at /htdocs/lib/db/upgrade.php:1487, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * xmldb_core_upgrade("2009111017") at /htdocs/lib/upgrade.php:301, referer: http://testmahara.barony.ac.uk/admin/upgrade.php


 * upgrade_core(object(stdClass)) at /htdocs/admin/upgrade.json.php:93, referer: http://testmahara.barony.ac.uk/admin/upgrade.php

----END OR ERROR LOG----

Cheers

Ali

11 results