Discussion of article "Applying network functions, or MySQL without DLL: Part II - Program for monitoring changes in signal properties" - page 3

 
leonerd #:

And on a running instance (old mysql) I get this from time to time:

Here on data[ptr]:

I have so far been unable to connect to MySQL 8.0.23 at all (error 1045: "access denied for user ... ").

Figuring it out.

About the error in line (367, 37) - strange. You should put a breakpoint check there and look at the values of variables. I have this library working around the clock not the first year, requests every 30 seconds (not short, with data). And it has never crashed once. I wish I knew what query was crashing it.

 
Я пока что вообще не смог подключиться к MySQL 8.0.23 (ошибка 1045: "access denied for user ... ").
from the GUI?
 

По поводу ошибки в строке (367, 37) - странно. Поставить бы там проверку с брейкпойнтом, посмотреть на значения переменных. У меня эта библиотека работает круглосуточно не первый год, запросы каждые 30 секунд (не короткие, с данными). И ни разу не падала. Знать бы, какой запрос её сносит.



Not easy to replicate.
 

mySql is returning POINTER_INVALID when I do a query in the OnDeInit of an EA, but the same code works when I execute it in the OnInit function, does anyone know what it could be?

 
Vinicius Oliveira POINTER_INVALID when I do a query in the OnDeInit of an EA, but the same code works when I execute it in the OnInit function, does anyone know what it could be?
please run the code in the debugger and tell us in which function the error occurs
 
Serhii Shevchuk #:
please run the code in the debugger and tell us in which function the error occurs

Probable location of the error


Apparently the error may be occurring here. In the"bool CMySQLTransaction::Query(string q)" function, in the MySQLTransaction.mqh file

 
2022.02.19 13:09:10.266      array out of range in 'MySQLTransaction.mqh' (471,11)


 

2022.02.19 13:22:44.346 array out of range in 'MySQLTransaction.mqh' (501,11)



 

2022.02.19 14:24:31.882         CMySQLTransaction::PacketDataHandler: m_responses=1
2022.02.19 14:24:31.882         array out of range in 'MySQLTransaction.mqh' (502,11)

 

Here's more on the array size in the log. In general, somewhere it doesn't change correctly or m_responses is wrong....

2022.02.19 14:28:59.455         CMySQLTransaction::PacketDataHandler: m_responses=1
2022.02.19 14:28:59.455         CMySQLTransaction::PacketDataHandler: m_rbuf size=1
2022.02.19 14:28:59.455         array out of range in 'MySQLTransaction.mqh' (503,11)


I made the array expand manually to m_responses+1 if necessary.