MySQL Forums
Forum List  »  General

The number of attributes is larger than the number of attribute values provided (500)
Posted by: Dennis Lim
Date: July 29, 2022 11:52PM

Hi All,

For the longest time I have been using Visual FoxPro with MySQL as my database backend. Also, I have been using SELECT COUNT(*) to get the total number of rows for any SELECT statement.

But this one is weird:

select count(*) as totrecs from pihdr a left join supplier b on a.supplierid=b.id left join ewtax c on a.ewtaxid=c.id left join jthdr d on a.jthdrid=d.id


In my ODBC trace log, this is what I found:

DIAG [01000] [MySQL][ODBC 8.0(w)Driver][mysqld-8.0.30]The number of attributes is larger than the number of attribute values provided (500)

The offending statement does not even show in the ODBC Trace log.

That is why I tried substituting it with (which is already deprecated):

select SQL_CALC_FOUND_ROWS * from pihdr a left join supplier b on
a.supplierid=b.id left join ewtax c on a.ewtaxid=c.id left join jthdr d
on a.jthdrid=d.id

select FOUND_ROWS() as totrecs


Still yields same error.

My code works with MySQL ODBC 8.0.30 and MySQL Server 5.7.37 perfectly... when I run it with MySQL ODBC 8.0.30 and MySQL Server 8.0.30.. that is where the error appear...

I was going to move up to MySQL 8.0.x. So I guess I have to wait for some resolution to this.

Options: ReplyQuote


Subject
Written By
Posted
The number of attributes is larger than the number of attribute values provided (500)
July 29, 2022 11:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.