Hi,
Please can you copy-and-paste examples of the failing lines, and the lines that you changed them to, so that we can understand the issue better?
Many thanks,
David
-
This reply was modified 7 years ago by David Anderson. Reason: subscribe to replies
Sure thing. The generated SQL was this:
CREATE ALGORITHM=UNDEFINED DEFINER=cpses_jlzSPmfEaQ
@localhost
SQL SECURITY DEFINER VIEWwp_terms_v
AS selecttr
.object_id
ASobject_id
,tr
.term_order
ASterm_order
,tr
.term_taxonomy_id
ASterm_taxonomy_id
,tt
.term_id
ASterm_id
,tt
.taxonomy
AStaxonomy
,tt
.parent
ASparent
,tt
.description
ASdescription
,tt
.count
AScount
,t
.name
ASname
,t
.slug
ASslug
,t
.term_group
ASterm_group
from ((wp_term_relationships
tr
joinwp_term_taxonomy
tt
on((tr
.term_taxonomy_id
=tt
.term_taxonomy_id
))) joinwp_terms
t
on((t
.term_id
=tt
.term_id
))) ;
and what I changed it to was this:
CREATE VIEWwp_active_posts_v
AS selectwp_posts
.ID
ASID
from (wp_posts
left joinwp_posts
p2
on((wp_posts
.post_parent
=p2
.ID
))) where (((wp_posts
.post_status
<> ‘trash’) and (wp_posts
.post_status
<> ‘auto-draft’)) or ((wp_posts
.post_status
= ‘inherit’) and (p2
.post_status
<> ‘trash’) and (p2
.post_status
<> ‘auto-draft’))) group bywp_posts
.ID
;
Thank you!
Those two don’t look like they’re the same thing. Are those two different views?
Oh man, I’m sorry! I had two custom views and got them mixed up. Let’s try this again. 🙂
The generated SQL was this:
CREATE ALGORITHM=UNDEFINED DEFINER=cpses_jlzSPmfEaQ
@localhost
SQL SECURITY DEFINER VIEW wp_terms_v
AS select tr
.object_id
AS object_id
,tr
.term_order
AS term_order
,tr
.term_taxonomy_id
AS term_taxonomy_id
,tt
.term_id
AS term_id
,tt
.taxonomy
AS taxonomy
,tt
.parent
AS parent
,tt
.description
AS description
,tt
.count
AS count
,t
.name
AS name
,t
.slug
AS slug
,t
.term_group
AS term_group
from ((wp_term_relationships
tr
join wp_term_taxonomy
tt
on((tr
.term_taxonomy_id
= tt
.term_taxonomy_id
))) join wp_terms
t
on((t
.term_id
= tt
.term_id
))) ;
and what I changed it to was this:
CREATE VIEW wp_terms_v
AS select tr
.object_id
AS object_id
,tr
.term_order
AS term_order
,tr
.term_taxonomy_id
AS term_taxonomy_id
,tt
.term_id
AS term_id
,tt
.taxonomy
AS taxonomy
,tt
.parent
AS parent
,tt
.description
AS description
,tt
.count
AS count
,t
.name
AS name
,t
.slug
AS slug
,t
.term_group
AS term_group
from ((wp_term_relationships
tr
join wp_term_taxonomy
tt
on((tr
.term_taxonomy_id
= tt
.term_taxonomy_id
))) join wp_terms
t
on((t
.term_id
= tt
.term_id
))) ;
Thank you. We’ve added an item for investigating this to our internal task-tracking system.
David