Moodle

ORA-00972: identifier is too long

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    SunOS geia 5.10 Generic_118833-36 sun4v, Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8i PHP/5.2.6 DAV/2, oci8 1.2.5 $Revision: 1.269.2.16.2.43 $, Oracle Enterprise 10

Description

Debug:

ORA-00972: identifier is too long

CREATE TABLE m_unittest_grade_categories_history ( id NUMBER(10) NOT NULL , action NUMBER(10) DEFAULT 0 NOT NULL, oldid NUMBER(10) NOT NULL, source VARCHAR2(255) DEFAULT NULL, timemodified NUMBER(10) DEFAULT NULL, loggeduser NUMBER(10) DEFAULT NULL, courseid NUMBER(10) NOT NULL, parent NUMBER(10) DEFAULT NULL, depth NUMBER(10) DEFAULT 0 NOT NULL, path VARCHAR2(255) DEFAULT NULL, fullname VARCHAR2(255) DEFAULT ' ' NOT NULL, aggregation NUMBER(10) DEFAULT 0 NOT NULL, keephigh NUMBER(10) DEFAULT 0 NOT NULL, droplow NUMBER(10) DEFAULT 0 NOT NULL, aggregateonlygraded NUMBER(1) DEFAULT 0 NOT NULL, aggregateoutcomes NUMBER(1) DEFAULT 0 NOT NULL, aggregatesubcats NUMBER(1) DEFAULT 0 NOT NULL, CONSTRAINT m_unittest_gradcatehist_id_pk PRIMARY KEY (id) )

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE INDEX m_unittest_gradcatehist_act_ix ON m_unittest_grade_categories_history (action)

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE INDEX m_unittest_gradcatehist_old_ix ON m_unittest_grade_categories_history (oldid)

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE INDEX m_unittest_gradcatehist_cou_ix ON m_unittest_grade_categories_history (courseid)

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE INDEX m_unittest_gradcatehist_par_ix ON m_unittest_grade_categories_history (parent)

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE SEQUENCE m_unittest_gradcatehist_i10_seq START WITH 1 INCREMENT BY 1 NOMAXVALUE

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

CREATE TRIGGER m_unittest_gradcatehist_id_trg BEFORE INSERT ON m_unittest_grade_categories_history FOR EACH ROW BEGIN IF :new.id IS NULL THEN SELECT m_unittest_gradcatehist_i10_seq.nextval INTO :new.id FROM dual; END IF; END;

  • line 103 of lib/dmllib.php: call to debugging()
  • line 2298 of lib/dmllib.php: call to execute_sql()
  • line 863 of lib/ddllib.php: call to execute_sql_arr()
  • line 498 of lib/simpletest/fixtures/gradetest.php: call to create_table()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

DELETE FROM m_unittest_grade_grades_history

  • line 1377 of lib/dmllib.php: call to debugging()
  • line 552 of lib/simpletest/fixtures/gradetest.php: call to delete_records()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00972: identifier is too long

DELETE FROM m_unittest_grade_outcomes_history

  • line 1377 of lib/dmllib.php: call to debugging()
  • line 587 of lib/simpletest/fixtures/gradetest.php: call to delete_records()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

ORA-00942: table or view does not exist

DELETE FROM m_unittest_scale_history

  • line 1377 of lib/dmllib.php: call to debugging()
  • line 621 of lib/simpletest/fixtures/gradetest.php: call to delete_records()
  • line 107 of lib/simpletest/fixtures/gradetest.php: call to grade_test->prepare_test_history_tables()
  • line 67 of lib/simpletestlib/invoker.php: call to grade_test->setUp()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleInvoker->invoke()
  • line 48 of lib/simpletestlib/errors.php: call to SimpleInvokerDecorator->invoke()
  • line 126 of lib/simpletestlib/invoker.php: call to SimpleErrorTrappingInvoker->invoke()
  • line 42 of lib/simpletestlib/exceptions.php: call to SimpleInvokerDecorator->invoke()
  • line 135 of lib/simpletestlib/test_case.php: call to SimpleExceptionTrappingInvoker->invoke()
  • line 589 of lib/simpletestlib/test_case.php: call to SimpleTestCase->run()
  • line 592 of lib/simpletestlib/test_case.php: call to TestSuite->run()
  • line 81 of admin/report/unittest/index.php: call to TestSuite->run()

Could not create all the test tables!

Activity

Hide
Dan Poltawski added a comment -

I'm re-assigning this to Eloy to review from an XMLDBey stance.

Show
Dan Poltawski added a comment - I'm re-assigning this to Eloy to review from an XMLDBey stance.
Hide
Tim Hunt added a comment -

Just thought, Nico might have some thoughts about this.

Show
Tim Hunt added a comment - Just thought, Nico might have some thoughts about this.
Hide
Nicolas Connault added a comment -

Try a single character as prefix, like t_

Show
Nicolas Connault added a comment - Try a single character as prefix, like t_
Hide
David Binney added a comment -

I have this same problem and there have been some other instances where the table name identifier has been to long for oracle. Sadly, the user did not copy the exact error message so I am not sure what query it was on. However, I can replicate this issue consistently.

Saddly, this is a restriction on oracle's part that restricts the table names to <30 chars and there is no way around this other than having a reasonable length table name. Perhaps, a look at the lengths of all table names would be a good idea if moodle is to support oracle connections?

Show
David Binney added a comment - I have this same problem and there have been some other instances where the table name identifier has been to long for oracle. Sadly, the user did not copy the exact error message so I am not sure what query it was on. However, I can replicate this issue consistently. Saddly, this is a restriction on oracle's part that restricts the table names to <30 chars and there is no way around this other than having a reasonable length table name. Perhaps, a look at the lengths of all table names would be a good idea if moodle is to support oracle connections?
Hide
Eloy Lafuente (stronk7) added a comment -

Well, the XMLDB editor (where all the tables for normal Moodle operation are handled), already include that check, so it's virtually impossible to create tables exceeding 28cc in their names.

The error above is about some tables created dynamically when running unit tests, using the "m_unittest_" prefix automatically and that's breaking Oracle's length limit.

I would propose to modify it to "mu" or "ut" (or t1, t2, t3, t4...) or something similar (always 2cc) checking always that there aren't already tables with that prefix when the tests start. That could do the trick (to be applied for Oracle only IMO)

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Well, the XMLDB editor (where all the tables for normal Moodle operation are handled), already include that check, so it's virtually impossible to create tables exceeding 28cc in their names. The error above is about some tables created dynamically when running unit tests, using the "m_unittest_" prefix automatically and that's breaking Oracle's length limit. I would propose to modify it to "mu" or "ut" (or t1, t2, t3, t4...) or something similar (always 2cc) checking always that there aren't already tables with that prefix when the tests start. That could do the trick (to be applied for Oracle only IMO) Ciao
Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Dates

  • Created:
    Updated:
    Resolved: