Data in Table Is Different When Seen From Different Sources

Data in Table Is Different When Seen From Different Sources

am 26.01.2011 22:14:46 von Hal Vaughan

I'm having the strangest issue. I am using a Perl program to test out =
some other Perl programs and all the Perl connections with MySQL are =
"normal", as in I use the standard interface. But in the test program =
I'm just using this:

$out =3D `mysql --table -e"SELECT * FROM search.Status"`;
print "$out\n";

as a quick and dirty way to check on the data tables while I'm working. =
This test program gives this output:

=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| Source | Search | Stage | Status | Resource | TotalItems | =
CurrentItem | CheckIn | PID |
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| alpha | one | 3 | waiting | 1 | -1 | =
-1 | 2011-0126-160720 | 0 |=20
| alpha | two | 1 | searching | 201 | -1 | =
-1 | 2011-0126-160115 | 12331 |=20
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+

I have two items in the first row that are my concern, the first is in =
the column Status, the 2nd is in the column PID. These are updated. =
Also, this program is a loop and after it displayed this table, I locked =
the screen with "ctrl-q" (in a BASH shell using Konsole on OS X with =
MacPorts). (Also, this system is a VM, under parallels, on another Mac =
and I'm using ssh to connect to that system to run all these commands.)

But when I go to the console where I've logged into MySQL and display =
this table, I get:

mysql> SELECT * FROM search.Status;
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| Source | Search | Stage | Status | Resource | TotalItems | =
CurrentItem | CheckIn | PID |
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| alpha | one | 3 | searching | 1 | -1 | =
-1 | 2011-0126-160120 | 12336 |=20
| alpha | two | 1 | searching | 201 | -1 | =
-1 | 2011-0126-160115 | 12331 |=20
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
2 rows in set (0.00 sec)

When I go to a command line and cut and paste the command from in the =
program, I get this:

hal@tnet-search:threshNet]$ mysql --table -e"SELECT * FROM =
search.Status"
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| Source | Search | Stage | Status | Resource | TotalItems | =
CurrentItem | CheckIn | PID |
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+
| alpha | one | 3 | searching | 1 | -1 | =
-1 | 2011-0126-155546 | 12294 |=20
| alpha | two | 1 | searching | 201 | -1 | =
-1 | 2011-0126-155545 | 12289 |=20
=
+--------+--------+-------+-----------+----------+---------- --+-----------=
--+------------------+-------+


So I'm checking this data table from THREE sources, from within MySQL, =
from the command line, and from within the Perl program. How can I get =
different values in two cells in the table?

Is there some kind of buffering along the way that could effect the =
output to the Perl program?


Thanks for any ideas on this!



Hal=

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Data in Table Is Different When Seen From Different Sources

am 26.01.2011 23:11:20 von misiaQ

"Hal Vaughan" wrote:
> I'm having the strangest issue. I am using a Perl program to test out some other Perl programs and all the Perl connections with MySQL are "normal", as in I use the standard interface. But in the test program I'm just using this:
>
[... cut ...]

Transaction isolation level?
Add a timestamp column showing last update and then compare values.

Regards,
m

------------------------------------------------------------ -----

Sprawdz pogode.
Kliknij >>> http://linkint.pl/f2903


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Data in Table Is Different When Seen From Different Sources

am 27.01.2011 01:04:26 von Hal Vaughan

On Jan 26, 2011, at 5:11 PM, misiaq@poczta.fm wrote:

> "Hal Vaughan" wrote:
>> I'm having the strangest issue. I am using a Perl program to test =
out some other Perl programs and all the Perl connections with MySQL are =
"normal", as in I use the standard interface. But in the test program =
I'm just using this:
>>=20
> [... cut ...]
>=20
> Transaction isolation level?=20
> Add a timestamp column showing last update and then compare values.

Thanks, actually, after sending that, I put in more time fields (since I =
would need them anyway) and that led me to finally finding a rogue =
process that was being forked in Perl, and finishing up fast enough that =
I didn't see it when I tried "ps -ax".

So it's solved now -- rogue process.


Thanks!



Hal=

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg