| Anonymous | Login | Signup for a new account | 2013-05-24 13:53 EDT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Wiki | ManTweet | Repositories |
| View Issue Details [ Jump to Notes ] [ Wiki ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0014234 | Plugin - CsvImport | [All Projects] General | public | 2012-05-10 11:49 | 2013-01-10 07:12 | ||||||||
| Reporter | badmoon | ||||||||||||
| Assigned To | |||||||||||||
| Priority | urgent | Severity | block | Reproducibility | always | ||||||||
| Status | assigned | Resolution | reopened | ||||||||||
| Platform | PC | OS | Windows | OS Version | 7 | ||||||||
| Summary | 0014234: Error 401 When openning Summary | ||||||||||||
| Description | I have loaded excel data bugs in Mantis using the CSV import plugin Now when I go in the summary screen I have the following issue : APPLICATION ERROR 0000401 Database query failed. Error received from database was #1690: BIGINT UNSIGNED value is out of range in '(1336664848 - `mantix`.`mantis_bug_table`.`date_submitted`)' for the query: SELECT COUNT(*) FROM mantis_bug_table WHERE ((1336664848 - date_submitted)<= 86400) AND project_id=1. | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Attached Files | |||||||||||||
Notes |
|
|
badmoon (reporter) 2012-05-10 12:23 |
Solved updating summary_api.php function summary_nw_bug_count_by_date adding cast ... as signed $query = "SELECT COUNT(*) FROM $t_mantis_bug_table WHERE " . db_helper_compare_days( "" . db_now() . "", "cast(date_submitted as signed)", "<= $c_time_length" ) . " AND $specific_where"; |
|
dregad (developer) 2012-05-11 04:42 |
Your fix is not really portable as data types vary across RDBMS. Since you imported data using CSV plugin, I suggest you have a closer look at the contents of the date_submitted field (compare it with an issue created manually within Mantis) |
|
rombert (developer) 2012-05-11 06:15 |
According to http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html [^] for BIGINT the unsigned range is 0 to 18446744073709551615 , so it looks like the date_submitted value is way out of range. Casting to an integer will only mask the real problem. |
|
badmoon (reporter) 2012-05-11 06:36 |
I have checked date_submitted and there is no rows > 18446744073709551615 or < 0 |
|
grangeway (developer) 2012-05-12 12:12 |
If you can reproduce this issue with a stock mantis installation, please reopen and we'll take a look into the cause. |
|
rombert (developer) 2012-05-13 15:34 |
I'm actually interested to see how this plays out. Maybe it's an error in the core code which is exposed by the plugin so let's not rule it out so quickly. |
|
grangeway (developer) 2012-05-13 17:53 |
hence why I said reopen with more information - there's still no information here to fix anything :) |
|
grangeway (developer) 2012-05-13 18:06 |
It's a bug in the plugin - We convert the values to an int - depending on timezone, what the csv import plugin does and badmoon's timezone for the imported data - it's feasible that current time - imported time in different timezone is less than 0, hence outside the range of an unsigned bit int. As soon as you cast it one of the data type's in the where clause I suspect that causes the whole where clause to get evaluated as signed, hence does't error. So the only thing we could is patch bug_create to ensure timestamps on submitted issues are not in the future. This is something that'll be somewhat easier to check for when using objects. If you look at the source code of the csv import plugin, it calls: $t_bug_data->date_submitted = date('Y-m-d G:i:s'); That's not a supported way of setting up date_submitted. |
|
rombert (developer) 2012-05-24 15:11 |
Paul, thanks for the investigation. I'm moving this to the csv import plugin. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-10 11:49 | badmoon | New Issue | |
| 2012-05-10 12:23 | badmoon | Note Added: 0031803 | |
| 2012-05-11 04:42 | dregad | Note Added: 0031809 | |
| 2012-05-11 06:15 | rombert | Note Added: 0031812 | |
| 2012-05-11 06:36 | badmoon | Note Added: 0031814 | |
| 2012-05-11 07:45 | sjannu | Note Added: 0031815 | |
| 2012-05-11 07:46 | sjannu | Note Deleted: 0031815 | |
| 2012-05-12 12:12 | grangeway | Note Added: 0031819 | |
| 2012-05-12 12:12 | grangeway | Status | new => resolved |
| 2012-05-12 12:12 | grangeway | Resolution | open => unable to reproduce |
| 2012-05-12 12:12 | grangeway | Assigned To | => grangeway |
| 2012-05-13 15:34 | rombert | Note Added: 0031825 | |
| 2012-05-13 15:34 | rombert | Assigned To | grangeway => |
| 2012-05-13 15:34 | rombert | Status | resolved => assigned |
| 2012-05-13 15:34 | rombert | Resolution | unable to reproduce => reopened |
| 2012-05-13 15:34 | rombert | Description Updated | View Revisions |
| 2012-05-13 17:53 | grangeway | Note Added: 0031826 | |
| 2012-05-13 18:06 | grangeway | Note Added: 0031827 | |
| 2012-05-24 15:11 | rombert | Note Added: 0031896 | |
| 2012-05-24 15:12 | rombert | Project | mantisbt => Plugin - CsvImport |
| 2012-05-24 15:12 | rombert | Category | db mysql => General |
| 2013-04-05 08:25 | atrol | Relationship added | has duplicate 0015715 |
| MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.1048 seconds. memory usage: 2,775 KB |