Posts: 34
Joined: Dec 2009
Reputation:
0
Sorry guys, I'm an idiot. I'm apparently using MariaDB 10.1.9 as well. I recently rebuilt my media server and installed via Xamp this time. Sorry for the confusion.
.
Posts: 283
Joined: Feb 2014
Reputation:
3
yeah, thats what I thought. how about you others? are you SURE you're actually using mysql and NOT mariadb 10.1.x?
Posts: 255
Joined: Jan 2009
Reputation:
0
2016-01-15, 04:58
(This post was last modified: 2016-01-15, 05:04 by Necromancyr.)
I'm using Maria as well - same thing as bobrico. Just rebuilt my server and have my database on the Win7 VM i setup first to mimic what I had earlier.
...contemplating setting up a MySQL server on Ubuntu now purely for this...might be easier.
...or just using HeidiSQL would do it in ten seconds. That was damn easy - thanks!
Posts: 6
Joined: Dec 2014
Reputation:
0
I can confirm this problem as well. Kodi is 16.1 RC.
I am using XAMPP 5.6.19 on a Windows 8.1 machine and have this issue. Every TV Series that I put into the database has the wrong episode count. it is always twice the original count minus 1. A series with 20 episodes has 39 ((2x20)-1), one with 214 episodes hast 227 etc.
Posts: 17
Joined: Nov 2013
Reputation:
0
This is fixed in MariaDB 10.1.13. No need to alter the view any longer.
Posts: 140
Joined: May 2014
Reputation:
6
2016-04-07, 09:47
(This post was last modified: 2016-04-07, 09:50 by Sionzris.)
As a side note, why use xampp in the first place? I know it has that fancy launcher, but you pretty much always install outdated software o.O
There are great Apache binaries out there, MariaDB has a binary which comes with HeidiSQL so you don't need phpmyadmin...
Posts: 17
Joined: Nov 2013
Reputation:
0
Has nothing to do with xampp. Regardless of platform, this bug existed in the last version of MariaDB. Windows, Linux, and (I assume, not having tested it) MacOS users all suffered from this problem. It was a known issue. Xampp had nothing to do with this.
Posts: 8
Joined: Jun 2014
Reputation:
0
The same issue listed here was annoying me ever since I moved from local to dedicated DB.
Thankfully, the two `nullif` -> `ifnull` changes to the `tvshowcounts` view fixed the issue also for me.
For comparison, the results before:
idShow|lastPlayed |totalCount|watchedcount|totalSeasons|dateAdded |
------|-------------------|----------|------------|------------|-------------------|
2|2019-11-15 14:45:30| 51| 16| 1|2010-01-30 21:24:22|
3|2019-07-18 21:36:29| 39| 9| 1|2019-05-05 16:28:11|
4|2019-10-12 09:58:03| 143| 66| 3|2019-02-25 02:43:49|
5|2019-10-22 23:29:15| 27| 6| 3|2019-05-05 09:52:36|
6| | | 0| | |
8| | | 0| | |
9| | 25| 0| 1|2013-02-01 05:49:25|
10|2019-11-24 19:53:11| 25| 13| 1|2019-11-22 19:09:04|
11|2019-12-23 20:54:08| 247| 124| 7|2019-07-24 17:10:06|
12|2019-05-20 20:42:18| 11| 6| 1|2019-05-20 18:35:06|
13|2019-03-25 13:48:16| 11| 6| 1|2017-12-01 23:07:30|
14| | | 0| | |
16|2019-07-27 08:22:06| 27| 14| 1|2016-08-21 01:16:17|
18|2015-10-14 22:42:50| 3| 2| 1|2014-12-01 09:35:32|
19|2018-10-28 11:09:06| 5| 3| 1|2017-12-01 15:13:22|
20| | 15| 0| 1|2018-11-15 21:07:53|
21| | | 0| | |
23| | | 0| | |
24|2019-11-11 22:54:17| 119| 60| 5|2018-10-21 03:43:02|
27|2015-09-05 17:12:17| 11| 4| 2|2019-05-09 21:50:31|
28| | 3| 0| 2|2019-05-05 17:56:18|
29|2016-02-13 14:09:55| 11| 5| 1|2019-05-09 21:51:47|
31| | | 0| | |
32| | | 0| | |
35| | | 0| | |
37| | | 0| | |
38|2019-12-02 20:07:20| 27| 14| 1|2019-11-26 20:16:40|
39| | 33| 0| 1|2019-11-29 21:08:37|
40| | 25| 0| 1|2019-11-29 19:40:10|
41|2020-01-14 22:22:26| 49| 6| 1|2019-11-29 20:25:58|
42| | 21| 0| 1|2019-11-29 20:46:45|
43| | 37| 0| 1|2019-11-29 19:03:27|
44| | 31| 0| 1|2019-11-29 20:37:35|
50|2019-12-14 18:03:04| 1| 1| 1|2019-12-14 11:59:24|
51| | 23| 0| 1|2019-11-29 19:52:30|
52| | | 0| | |
54| | 7| 0| 1|2009-06-16 03:11:10|
55| | 35| 0| 1|2020-01-17 20:28:19|
56| | 11| 0| 1|2020-01-17 22:00:59|
and after:
idShow|lastPlayed |totalCount|watchedcount|totalSeasons|dateAdded |
------|-------------------|----------|------------|------------|-------------------|
2|2019-11-15 14:45:30| 26| 16| 1|2010-01-30 21:24:22|
3|2019-07-18 21:36:29| 20| 9| 1|2019-05-05 16:28:11|
4|2019-10-12 09:58:03| 72| 66| 3|2019-02-25 02:43:49|
5|2019-10-22 23:29:15| 14| 6| 3|2019-05-05 09:52:36|
6| | 0| 0| 0| |
8| | 0| 0| 0| |
9| | 13| 0| 1|2013-02-01 05:49:25|
10|2019-11-24 19:53:11| 13| 13| 1|2019-11-22 19:09:04|
11|2019-12-23 20:54:08| 124| 124| 7|2019-07-24 17:10:06|
12|2019-05-20 20:42:18| 6| 6| 1|2019-05-20 18:35:06|
13|2019-03-25 13:48:16| 6| 6| 1|2017-12-01 23:07:30|
14| | 0| 0| 0| |
16|2019-07-27 08:22:06| 14| 14| 1|2016-08-21 01:16:17|
18|2015-10-14 22:42:50| 2| 2| 1|2014-12-01 09:35:32|
19|2018-10-28 11:09:06| 3| 3| 1|2017-12-01 15:13:22|
20| | 8| 0| 1|2018-11-15 21:07:53|
21| | 0| 0| 0| |
23| | 0| 0| 0| |
24|2019-11-11 22:54:17| 60| 60| 5|2018-10-21 03:43:02|
27|2015-09-05 17:12:17| 6| 4| 2|2019-05-09 21:50:31|
28| | 2| 0| 2|2019-05-05 17:56:18|
29|2016-02-13 14:09:55| 6| 5| 1|2019-05-09 21:51:47|
31| | 0| 0| 0| |
32| | 0| 0| 0| |
35| | 0| 0| 0| |
37| | 0| 0| 0| |
38|2019-12-02 20:07:20| 14| 14| 1|2019-11-26 20:16:40|
39| | 17| 0| 1|2019-11-29 21:08:37|
40| | 13| 0| 1|2019-11-29 19:40:10|
41|2020-01-14 22:22:26| 25| 6| 1|2019-11-29 20:25:58|
42| | 11| 0| 1|2019-11-29 20:46:45|
43| | 19| 0| 1|2019-11-29 19:03:27|
44| | 16| 0| 1|2019-11-29 20:37:35|
50|2019-12-14 18:03:04| 1| 1| 1|2019-12-14 11:59:24|
51| | 12| 0| 1|2019-11-29 19:52:30|
52| | 0| 0| 0| |
54| | 4| 0| 1|2009-06-16 03:11:10|
55| | 18| 0| 1|2020-01-17 20:28:19|
56| | 6| 0| 1|2020-01-17 22:00:59|
As you can figure, all `totalCount` values before were strangely calculated as (n * 2) - 1.
I'm running Kodi v18.5.
Posts: 8
Joined: Jun 2014
Reputation:
0
The fix was reverted with upgrade to 19.0 and the same wrong count has returned
Posts: 8
Joined: Jun 2014
Reputation:
0
The fix was reverted with upgrade to 20.0 and the same wrong count has returned.
Posts: 8
Joined: Jun 2014
Reputation:
0
The manual fix to the view was reverted with upgrade to 21.0 and the same wrong count has returned.
Posts: 1,390
Joined: Apr 2010
Reputation:
115
CrystalP
Team-Kodi Developer
Posts: 1,390
The "fix" was not merged into Kodi's codebase so no surprise there.
I haven't seen that problem on MariaDB 10.11 or 11.4 (the current long term releases) and previous messages indicate that the cause was a bug in early mariadb 10.1 releases. That version was released in 2015 and support ended in Oct 2020, it's time to upgrade.
We'll need to know more about your environment and a way to reproduce the issue from scratch.
btw I don't see the need for the nullif in the view anyway. Replacing with ifnull seems unnecessary, why not remove it altogether.