×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

SQL_CALC_FOUND_ROWS still runs in MySQL 8.0.29

SQL_CALC_FOUND_ROWS still runs in MySQL 8.0.29

SQL_CALC_FOUND_ROWS still runs in MySQL 8.0.29

(OP)
Hi Guys,

As per MySQL documentation, SQL_CALC_FOUND_ROWS and FOUND_ROWS() has been deprecated since MySQL 8.0.17.

How come I can still use it in MySQL 8.0.29?

Comments please? Or maybe I missed a newer memo on this?

RE: SQL_CALC_FOUND_ROWS still runs in MySQL 8.0.29


Depreciated doesn't mean removed. It will be removed in a future version. Think of it as a warning that you should refactor your code if you do use it.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

RE: SQL_CALC_FOUND_ROWS still runs in MySQL 8.0.29

(OP)
MarkSweetLand,

Hi. Thanks for your reply. Noted on this.

I stumbled into these because I encountered a very weird error using SELECT COUNT(*)....

This I believe is the offending code:

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, 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)
 


That is why I tried substituting it with:

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 

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...


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close