{"shas":[["1de043119cac1cdae3a418a5b4203a7fce58f514","02f991b48f2026392006a6087ea965fe79d2392f@mythtv.org","Fix inefficiency in marking first/last showings without programids.\n\nFor users without programids (where listings provider doesn't specify a\nprogramid and doesn't specify both season and episode number),\nmythfilldatabase marks first/last showings by comparing title, subtitle,\nand description to find unique episodes.  If the listings provider\nprovides extremely long descriptions (>>255 characters), this results in\nmysqld creating on-disk temp tables, and can create extremely long run\ntimes for this specific query (with one user reporting times on the\norder of 30min using an AMD Athlon II 5050e with 2GB RAM).\n\nThis change limits the query to use only the first 1024 characters of\ndescription for the SELECT and the GROUP BY.  This is equivalent to what\nwe were doing before ccb759a946 changed the description from TEXT to\nVARCHAR, since MySQL automatically uses max_sort_length (defaults to\n1024) for sorting text and blob fields (including GROUP BY).  Even in\nthe event of 2 shows that differ only after the first 1024 characters of\nthe description, but that air at the same time, the logic is sound.  In\nthe event 2 shows with different start times that differ only after the\nfirst 1024 characters of the description exist in the listings, one\nwon't be properly marked as first/last showing, but I'd hope that\nlistings providers would provide some indication of differences before\nthe end of the novel (but, again, this is the same behavior we would\nhave seen before the change to use VARCHAR for description).\n\nThanks to Jan Schneider for noticing the issue and performing a bunch of\ntest queries to help me find a way to work around it.\n(cherry picked from commit 8b0daaf01f00605a424e95e55d0d62ab60827d70)","Michael T. Dean"]],"ref":"refs/heads/fixes/0.24","size":1,"head":"1de043119cac1cdae3a418a5b4203a7fce58f514","push_id":41039967}