Recent

Author Topic: Management System Replication in MYSQL  (Read 10962 times)

gregorytecno

  • New Member
  • *
  • Posts: 12
Management System Replication in MYSQL
« on: February 01, 2014, 06:30:12 am »
Goodnight
I am new to the forum,
I'm doing a project to manage and monitor database replication independent of the version of Mysql use 4.x, 5.x
With it you can manage all functions of replication on all nodes participating in the replication with any click (start slave, slave stop, flush and reset master / slave, master update free slave states, network diagnosis and reading and writing of files stored binlogs all SQL statements ).
My question is this, when you run the command SHOW BINLOG EVENTS onA query object and assign it to a dbMemo or DBEdit the info field of view displays up to 20 characters Field Memo is knowing that, as with the instruction SHOW SLAVE STATUS, not show the full value of Slave_IO_State field .
I have made several changes such as changing the size or dbMemo DBEdit and apparently in the Object Property FieldDefs query always assigned length 20 and no matter if you change the value always returns 20 characters in objects.
I wanted to know if anyone has the ability to help me in this regard to correct this problem.

mangakissa

  • Hero Member
  • *****
  • Posts: 948
Re: Management System Replication in MYSQL
« Reply #1 on: February 01, 2014, 12:31:30 pm »
Did you  have this commando run in the prompt?
I think your information of your memofield will be trimmed, because you show more than one fields.
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #2 on: February 01, 2014, 04:47:10 pm »
Hello
This is an internal command for querying mysql Server Statistics Database, Ejm: SHOW SLAVE STATUS, SHOW PROCESSLIST.
These are commands that do not originate from a table with a select. If you have HeidiSQL or other mysql client, you can access the entire result field without limitations.
You have a test, and in the SQL Query property of an object, the copy SHOW BINLOG EVENTS command, you run the query.
connects the query to a grid and see how in the INFO field displays 20 characters. What can you do to show properly INFO field and see the complete sql statement?

mangakissa

  • Hero Member
  • *****
  • Posts: 948
Re: Management System Replication in MYSQL
« Reply #3 on: February 01, 2014, 10:03:33 pm »
It shows nothing on my server. I used Show processlist and saw the infofield, but I couln't see the length of the infofield. Tested with DBForge 6.0 pro for MySQL.

I still think it's a behavour of the server itself.
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #4 on: February 02, 2014, 12:06:52 am »
I do not think that's it. I think it's a bug in Lazarus Mysql internal commands that if it does not the same with a mysql client. Here I attached two images of what I'm doing to see the IMG01.JPG shows the result of mysql query from a client and IMG02.JPG as shown on a form in a dbMemo lazarus and dbGrid. if you see the value of the result dbMemo Displays up to 20 characters as in the dbGrid. That's what I want you to help me fully display the complete value in the dbMemo as the Grid. I have reviewed and have been found to be the RecordSet that brings him to 20 characters automatically. ejm to have that you see. of course, that you can function must have log-bin enabled on your mysql my.cnf file. I hope your answer.

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: Management System Replication in MYSQL
« Reply #5 on: February 02, 2014, 01:17:31 am »
isn't the info a memo type of field? why does the grid show a string and not a [dbmemo] warning or something? Please provide some code we can look at to find the problem. My guess is that you have written an ongetvalue/string handler and in there you are truncating the result to a 20 char long string.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #6 on: February 03, 2014, 06:21:00 pm »
Hello in that form no lines of code.
All the link is made by MySqlConnection, TSQLQuery, TSQLTransaction, TDataSource, TDBGrid AND TDBMEMO.
In the SQL property of TSQLQuery add Show Binlog Events; and then you link the TDataSource on TDBGrid AND TDBMEMO and ready. You test your computer and tell me your result that throws you the query. If you have a MySQL client will show all SQL statements executed on the server. But Lazarus that field shows up to 20 caracateres. Be guided by the images I uploaded earlier.
You see the 'Info' column of the grid displays up to 20 characters.
« Last Edit: February 03, 2014, 06:32:01 pm by gregorytecno »

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #7 on: February 06, 2014, 12:08:08 am »
What happened, I have not received answers to the problem I present?.
It's as simple as wanting to display the information in a field correctly.
In the above explanation, I said that the components are linked unused lines of code. So I said to do the example for them to see the results it gives query Show Binlog Events. While you do not design the form, you will not know what I'm talking about.
simple: Add in the form MySqlConnection, TSQLQuery, TSQLTransaction, TDataSource, AND TDBMEMO TDBGrid. In the SQL property ADD Show Binlog Events; Active = True, the Dataset of TDataSource = SQLQuery. Done.
Displays a Grid and Recorset Pleassssssseeeeeeee!!! Tell me whyyyyyy not show the Full INFO field. That's it all. I hope your analysis and Answers.
« Last Edit: February 06, 2014, 01:11:55 am by gregorytecno »

mangakissa

  • Hero Member
  • *****
  • Posts: 948
Re: Management System Replication in MYSQL
« Reply #8 on: February 06, 2014, 10:46:18 am »
I don't have binlog events, so can't help you with that.
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #9 on: February 06, 2014, 11:50:10 am »
if you have mysql installed you have it. simply you have disabled that option in you mysql server. in the my.ini or my.cnf file you'll find that option with a #. indicating that the line is commented out. otherwise it is simply you don't want to make a contribution.
You don't know how you enable binlog in your server. This is the mysql help
 http://dev.mysql.com/doc/refman/5.0/es/binary-log.html

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #10 on: February 06, 2014, 11:58:16 am »

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #11 on: February 06, 2014, 12:01:03 pm »
if something as basic as this sql command can not show good lazarus you tell me ...

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #12 on: February 06, 2014, 12:27:57 pm »
if you can't, Recommend me someone on the forum if you can, because you open a topic for help on a problem and not to be in the same place.

mangakissa

  • Hero Member
  • *****
  • Posts: 948
Re: Management System Replication in MYSQL
« Reply #13 on: February 06, 2014, 03:48:18 pm »
I've test it and SQLQuery.fieldbyname('info').size has 20 characters.
But I still think it a problem of libmysql.dll. TSQLConnection is talking to it and the lib give a result back.
I've tested also on DBForge for MySQL from Devart and the shows the right info.

Devart also have MySQL data access components for Lazarus/FPC 1.0.12 as trial. They are connecting directly to your MySQL server (I'm not a salesman ;) )

Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

gregorytecno

  • New Member
  • *
  • Posts: 12
Re: Management System Replication in MYSQL
« Reply #14 on: February 06, 2014, 04:52:17 pm »
Thanks for your help. I think it may be how lazarus recordset interprets internally, because I've tried several libmysql.dll version 4.x and 5.x of gives me the same error. Must be dbSqlQuery component that handles the query fields with default size, when the query is not from a Select Query. I have also tried other commands mysql reserved and feel the same, for example Show Slave Status, show processlist. So I think the problem is dbSqlQuery lazarus component. I have not tried using mysql native, to see if it gives the same return results. Thanks