| Anonymous | Login | Signup for a new account | 2013-05-24 00:53 EDT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Wiki | ManTweet | Repositories |
| View Issue Details [ Jump to Notes ] [ Wiki ] [ Related Changesets ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0012033 | mantisbt | installation | public | 2010-06-11 07:22 | 2011-08-02 12:35 | ||||
| Reporter | thefake | ||||||||
| Assigned To | dhx | ||||||||
| Priority | low | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | 1.2.1 | ||||||||
| Target Version | 1.2.3 | Fixed in Version | 1.2.3 | ||||||
| Summary | 0012033: check.php tests views if they are utf8 like tables | ||||||||
| Description | On install or update on testing the system with <path>/admin/check.php it shows some errors if there are views in the mysql database. e.g. "Checking Table Collation is utf8 for quater_sales_view.... BAD" The function test_database_utf8() checks the Collation field of the "SHOW TABLE STATUS" statement for every table. This will fail on views as written on http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html [^] quote "For views, all the fields displayed by SHOW TABLE STATUS are NULL except that Name indicates the view name and Comment says view." | ||||||||
| Steps To Reproduce | make an view on the database where you want to install mantis, copy the copy of mantis on the webserver and run /admin/check.php | ||||||||
| Additional Information | A possible fix would be adding a new line to the test_database_utf8() function: code: ----- function test_database_utf8() { if ( !db_is_mysql() ) { return; } // table collation/character set check $result = db_query_bound( 'SHOW TABLE STATUS' ); while( $row = db_fetch_array( $result ) ) { //this line drops out views if($row['Comment'] != 'VIEW' && $row['Comment'] != 'view' && $row['Engine'] != null){ print_test_row( 'Checking Table Collation is utf8 for ' . $row['Name'] . '....', substr( $row['Collation'], 0, 5 ) === 'utf8_', $row['Collation'] ); } } foreach( db_get_table_list() as $t_table ) { if( db_table_exists( $t_table ) ) { $result = db_query_bound( 'SHOW FULL FIELDS FROM ' . $t_table ); while( $row = db_fetch_array( $result ) ) { if ( $row['Collation'] === null ) { continue; } print_test_row( 'Checking Non-null Column Collation in ' . $t_table . ' is utf8 for ' . $row['Field'] . '....', substr( $row['Collation'], 0, 5 ) === 'utf8_', $row['Collation'] . ' ( ' . $row['Type'] . ')' ); } } } } | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
Notes |
|
|
dhx (developer) 2010-06-11 07:56 |
Thanks for the descriptive bug report, I've targeted it for the 1.2.2 release. |
|
dhx (developer) 2010-08-12 09:45 |
Should be fixed now, thanks for the help! |
Related Changesets |
|||
|
MantisBT: master a6e6fb6d
Timestamp: 2010-08-12 13:29:43 Author: dhx [ Details ] [ Diff ] |
Fix 0012033: admin/check utility treats MySQL views like tables The function test_database_utf8() checks the Collation field of the "SHOW TABLE STATUS" statement for every table. This will fail on views as written on http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html [^] quote "For views, all the fields displayed by SHOW TABLE STATUS are NULL except that Name indicates the view name and Comment says view." |
||
| mod - admin/check/check_database_inc.php | [ Diff ] [ File ] | ||
|
MantisBT: master-1.2.x 18e38217
Timestamp: 2010-08-12 13:29:43 Author: dhx [ Details ] [ Diff ] |
Fix 0012033: admin/check utility treats MySQL views like tables The function test_database_utf8() checks the Collation field of the "SHOW TABLE STATUS" statement for every table. This will fail on views as written on http://dev.mysql.com/doc/refman/5.5/en/show-table-status.html [^] quote "For views, all the fields displayed by SHOW TABLE STATUS are NULL except that Name indicates the view name and Comment says view." |
||
| mod - admin/check.php | [ Diff ] [ File ] | ||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-06-11 07:22 | thefake | New Issue | |
| 2010-06-11 07:55 | dhx | Assigned To | => dhx |
| 2010-06-11 07:55 | dhx | Status | new => assigned |
| 2010-06-11 07:56 | dhx | Note Added: 0025807 | |
| 2010-06-11 07:56 | dhx | Target Version | => 1.2.2 |
| 2010-07-29 10:41 | jreese | Target Version | 1.2.2 => 1.2.3 |
| 2010-08-12 09:44 | dhx | Changeset attached | => MantisBT master a6e6fb6d |
| 2010-08-12 09:44 | dhx | Changeset attached | => MantisBT master-1.2.x 18e38217 |
| 2010-08-12 09:44 | dhx | Resolution | open => fixed |
| 2010-08-12 09:44 | dhx | Fixed in Version | => 1.2.3 |
| 2010-08-12 09:45 | dhx | Note Added: 0026297 | |
| 2010-08-12 09:45 | dhx | Status | assigned => resolved |
| 2011-08-02 12:35 | dregad | Status | resolved => closed |
| MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.0939 seconds. memory usage: 2,800 KB |