HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Got this error when I tried to run new_indices.php

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#67690 (In Topic #14418)
Avatar

Community saint

Got this error when I tried to run /data_custom/new_indices.php to get full benefit of the performance improvements in the v6.0 (http://davidlfriend.com)

An error has occurred

Unfortunately a query has failed [ALTER TABLE ocp5_chat_messages ADD INDEX ordering (date_and_time)] [Duplicate key name 'ordering'] (version: 6.0, PHP version: 5.2.11, URL: /data_custom/new_indices.php)

Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File'/home/davidlfr/public_html/sources/failure.php'
Line'658'
Function'get_html_trace'
Args 

File'/home/davidlfr/public_html/sources/global2.php'
Line'922'
Function'_fatal_exit'
Argsobject
 

File'/home/davidlfr/public_html/sources/database/mysql.php'
Line'240'
Function'fatal_exit'
Argsobject
 

File'/home/davidlfr/public_html/sources/database/shared/mysql.php'
Line'70'
Function'db_query'
Class'Database_Static_mysql'
Type'->'
ObjectDatabase_Static_mysql::__set_state(array( ))
Args'ALTER TABLE ocp5_chat_messages ADD INDEX ordering (date_and_time)'

array ( 0 => NULL, 1 => 'davidlfr_ocp', )
 

File'/home/davidlfr/public_html/sources/database_helper.php'
Line'195'
Function'db_create_index'
Class'Database_super_mysql'
Type'->'
ObjectDatabase_Static_mysql::__set_state(array( ))
Args'ocp5_chat_messages'

'ordering'

'date_and_time'

array ( 0 => NULL, 1 => 'davidlfr_ocp', )

'id'
 

File'/home/davidlfr/public_html/sources/database.php'
Line'1,139'
Function'_helper_create_index'
Argsdatabase_driver::__set_state(array( 'table_prefix' => 'ocp5_', 'connection_read' => array ( 0 => NULL, 1 => 'davidlfr_ocp', ), 'connection_write' => array ( 0 => NULL, 1 => 'davidlfr_ocp', ), 'text_lookup_original_cache' => array ( 7 => 'Welcome', 1 => 'The Art and Imaginagtion of David L. Friend', 72 => '', 73 => '', 32 => 'Administrators', 33 => 'Site director', ), 'text_lookup_cache' => array ( 7 => '', 1 => '', 72 => '', 73 => '', 32 => '', 33 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))

'chat_messages'

'ordering'

array ( 0 => 'date_and_time', )

'id'
 

File'/home/davidlfr/public_html/data_custom/new_indices.php'
Line'135'
Function'create_index'
Class'database_driver'
Type'->'
Objectdatabase_driver::__set_state(array( 'table_prefix' => 'ocp5_', 'connection_read' => array ( 0 => NULL, 1 => 'davidlfr_ocp', ), 'connection_write' => array ( 0 => NULL, 1 => 'davidlfr_ocp', ), 'text_lookup_original_cache' => array ( 7 => 'Welcome', 1 => 'The Art and Imaginagtion of David L. Friend', 72 => '', 73 => '', 32 => 'Administrators', 33 => 'Site director', ), 'text_lookup_cache' => array ( 7 => '', 1 => '', 72 => '', 73 => '', 32 => '', 33 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))
Args'chat_messages'

'ordering'

array ( 0 => 'date_and_time', )
 

File'/home/davidlfr/public_html/data_custom/new_indices.php'
Line'54'
Function'execute_temp'
Args 


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#67698
Avatar

Community saint

Having gotten this error on my non-live site after upgrading to the 6.0 version - I am hesitant to apply this  index upgrade to my main live site (The Fascinating World of Dinosaurs and Prehistoric Creatures of all Kinds - Prehistorics Illustrated Dinosaurs) that is after it gets the upgrade to the 6.0 or 6.01 version.

…and BTW before I upgrade the current 5.0.3 version of ocPortal on live The Fascinating World of Dinosaurs and Prehistoric Creatures of all Kinds - Prehistorics Illustrated Dinosaurs to the new 6.0.1 version do I still have to apply the version 5 upgrader? I have already done this but have not tried to paste in the URL to the upgrade generator?


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#67721
Avatar

Just about everyone has had some kind of error from this script. However the errors can be ignored. Regardless I have now reuploaded it to filter out the various errors in it people have reported (different circumstances/upgrade paths led to different ones).

to the new 6.0.1 version do I still have to apply the version 5 upgrader?

Yes, what we have posted is a fix to this upgrader. It's actually a tiny change to fix a specific bug in it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#67724
Avatar

Community saint

Chris Graham said

Just about everyone has had some kind of error from this script. However the errors can be ignored. Regardless I have now reuploaded it to filter out the various errors in it people have reported (different circumstances/upgrade paths led to different ones).

to the new 6.0.1 version do I still have to apply the version 5 upgrader?

Yes, what we have posted is a fix to this upgrader. It's actually a tiny change to fix a specific bug in it.
OK, thanks. I did apply this as I figured it would hurt anything and might even help. I am going ahead with the upgrade on the live site.


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#67738
Avatar

Community saint

Chris Graham said

Just about everyone has had some kind of error from this script. However the errors can be ignored.
Chris, won't an error like this stop the script from finishing and therefore the indices rebuild will be incomplete?

When I look at the tables, to me it looks like the rebuild has stopped at the point of failure (unless I'm not reading the table structure correctly).

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#67778
Avatar

Rats, you're right, sorry about that. The upgrader skips over bad SQL, this script doesn't. I have reuploaded it now so that it deletes then recreates them all so it will always finish correctly.

Those that didn't have it finish right need not worry though, these indices are likely only to make a noticeable difference once you've got thousands of records in the particular table.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: