Coder Social home page Coder Social logo

Problem with receiving all rows about mysql HOT 20 CLOSED

amphp avatar amphp commented on July 1, 2024
Problem with receiving all rows

from mysql.

Comments (20)

sallsabil avatar sallsabil commented on July 1, 2024

I'm waiting for you.
If there is no solution Please tell me to switch to the last one.
Thank you
@trowski
@bwoebi

from mysql.

bwoebi avatar bwoebi commented on July 1, 2024

I cannot reproduce that problem locally. May you please set const MYSQL_DEBUG = true; and dump me the data, so that I can replay and debug your connection?

Thanks :-)

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

I sent you the error:

2018-02-07T16:34:01.942293Z 215 [Note] Aborted connection 215 to db: 'dbn' user: 'root' host: 'localhost' (Got an error writing communication packets)

2018-02-07T15:48:02.011128Z 169 [Note] Aborted connection 169 to db: 'dbn' user: 'root' host: 'localhost' (Got an error reading communication packets)

There is not any other error

from mysql.

bwoebi avatar bwoebi commented on July 1, 2024

I mean within your script. with define("MYSQL_DEBUG", true); it should dump all the raw protocol data to the stderr of your script.

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

I did what you said but I received nothing other than:

2018-02-12T09:00:01.855322Z 6888 [Note] Aborted connection 6888 to db: 'groupbots' user: 'root' host: 'localhost' (Got an error reading communication packets)

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

I think the problem is from your project

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

Am I right ?

from mysql.

trowski avatar trowski commented on July 1, 2024

@sallsabil We may have a bug in our protocol implementation, but we cannot reproduce it ourselves. Please add const MYSQL_DEBUG = true; to your script, perhaps right after the autoload script is included. This will cause information about the raw protocol to be written to STDERR. If you're using a web SAPI, you may need to check the error log for this information, otherwise it should just be written to the console.

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024
<?php
	$start = microtime(true);
	set_time_limit(62);
	require "/root/vendor/autoload.php";
	const MYSQL_DEBUG = true;
	require __DIR__ . '/classes/setexpf.php';
	$setexpf = new setexpf();
	
	$rows = $setexpf->MGSC("SELECT * FROM groups ORDER BY id", 1);
	echo count($rows);

I use ubuntu 16.04 but in:
/var/log/mysql/error.log
I don't find anything other than the errors I sent in the last comments.

from mysql.

kelunik avatar kelunik commented on July 1, 2024

Are you using the CLI version of php?

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

yes

from mysql.

trowski avatar trowski commented on July 1, 2024

@sallsabil Please be sure assertions are enabled, as the debug code is wrapped with assert().

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

I avtivated assert() in php.ini file but no difference

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

Why can't you reproduce ?

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

How I understand my mysql doesn't support mysql_debug

from mysql.

kelunik avatar kelunik commented on July 1, 2024

It's a constant you set in your client code (PHP), it has nothing to do with the server. You will see the log in the error log of your HTTP server, not the MySQL server.

from mysql.

sallsabil avatar sallsabil commented on July 1, 2024

https://dev.mysql.com/doc/refman/5.7/en/dbug-package.html :
The MySQL server and most MySQL clients are compiled with the DBUG package originally created by Fred Fish. When you have configured MySQL for debugging, this package makes it possible to get a trace file of what the program is doing. See Section 28.5.1.2, “Creating Trace Files”.

you must have a mysqld that has been compiled with debugging support. You can check this by executing mysqld -V. If the version number ends with -debug, it is compiled with support for trace files.

My result of this command

mysqld -V

mysqld Ver 5.7.20-0ubuntu0.16.04.1 for Linux on x86_64 ((Ubuntu))

Not any -debug end.

from mysql.

kelunik avatar kelunik commented on July 1, 2024

@sallsabil This client completely re-implements the MySQL protocol and doesn't make use of any other implementation for that.

Could you extract your code into a command line script that's easily runnable by others and provide a dump of your database table (with dummy data if applicable)?

from mysql.

kelunik avatar kelunik commented on July 1, 2024

Thanks, but I guess we need more information to reproduce this behavior. Please provide either a Docker setup that reproduces the behavior or provide the debug log we requested. I'll close this issue as it hasn't been updated. We can always re-open the issue in case the requested information is provided.

from mysql.

valVk avatar valVk commented on July 1, 2024

@kelunik Than I'll try to help with this.

https://github.com/valVk/amph-mysql

Here is in table is 565529 rows

but in fact I can get only first 92 rows.

from mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.