List:MySQL and Perl« Previous MessageNext Message »
From:Michael Widenius Date:August 28 1999 9:31am
Subject:Re: BUG: $sth->rows broken for updates
View as plain text  
Hi!

<cut>

Jochen> I have now uploaded a version 1.2205 of the Msql-Mysql-modules to CPAN
Jochen> which has the following new feature: When connecting with

DBI-> connect("DBI:mysql:test;mysql_client_found_rows=0", ...)

Jochen> then you have the old behaviour. With

DBI-> connect("DBI:mysql:test;mysql_client_found_rows=1", ...)

Jochen> you have CLIENT_FOUND_ROWS set, thus your query will always return 1.


Jochen> The default is 0, however you can change this by compiling the
Jochen> Msql-Mysql-modules with

Jochen> 	perl Makefile.PL --config --mysql-use-client-found-rows

Jochen> in which case the default is 1.

Jochen> Monty, I dislike that this must be choosen while connecting to the
Jochen> client. Couldn't we make this part of the MYSQL structure?

The problem is that this is a server variable and not a client
variable.

One option would be to add 'SQL_RETURN_FOUND_ROWS' as a server
variable that one can set to affect this.  Would this be ok with you?

SET SQL_RETURN_FOUND_ROWS=[0 | 1];

Regards,
Monty
Thread
BUG: $sth->rows broken for updatesGregory C. Falck27 Aug
  • Re: BUG: $sth->rows broken for updatesJochen Wiedmann27 Aug
    • Re: BUG: $sth->rows broken for updatesMichael Widenius28 Aug
  • Re: BUG: $sth->rows broken for updatesGregory C. Falck28 Aug
    • Re: BUG: $sth->rows broken for updatesEric Siegerman28 Aug
      • Re: BUG: $sth->rows broken for updatesMichael Widenius28 Aug
      • Re: BUG: $sth->rows broken for updatesJochen Wiedmann28 Aug
      • Re: BUG: $sth->rows broken for updatesJochen Wiedmann29 Aug
  • Re: BUG: $sth->rows broken for updatesJochen Wiedmann28 Aug
    • Re: BUG: $sth->rows broken for updatesMichael Widenius29 Aug
  • Re: BUG: $sth->rows broken for updatesJochen Wiedmann29 Aug
  • Re: BUG: $sth->rows broken for updatesJochen Wiedmann30 Aug