Re: Interesting bug/oversight

2011-05-19 Thread Johan De Meersman
- Original Message -
> From: "Dan Nelson" 
> 
> I doubt that mysql calls anything other than gethostbyname() or
> getaddrinfo(), so your behaviour is probably dependant on whatever OS
> you are running and how often its local resolver re-checks resolv.conf.
> Usually that's only once when a program starts.  If you're running bind,
> nscd, or some other intermediate DNS client on your machine, bouncing that
> should work.  If not, you'll need to bounce mysql.

Yep, that was my first though, too. The documentation also confirms that the 
daemon calls gethostbyaddr() and gethostbyname(). However, as I said, it failed 
to switch to the new nameserver upon changing the resolv.conf, and didn't until 
I kicked the daemon in the olives.

Production machine also pointed to the wrong DNS server, but since I can't just 
restart that (badly written Java apps go boom) it still hasn't switched. Adding 
the correct entry to /etc/hosts does work around the issue, further confirming 
that yes, it probably does use the standard resolver.

Random *nix people in the meantime confirm that this is not only a MySQL 
problem; although I can't help but wonder if it would be possible to work 
around it in the flush hosts procedure.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Interesting bug/oversight

2011-05-19 Thread Dan Nelson
In the last episode (May 19), Johan De Meersman said:
> I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the
> performance impact, that's not an issue.
> 
> I just found out through failing logins that a server was still connecting
> to an old DNS server, and properly updated the resolv.conf.  Commandline
> host lookups then returned correct results.
> 
> However, even after repeated flush hosts commands, the MySQL kept
> returning wrong results.  Only after a full restart did it pick itself up
> and start doing proper lookups.  I strongly suspect that this is due to it
> internally caching the nameserver, too, and not refreshing that along with
> the host cache on a flush hosts command.
> 
> Can anyone confirm this is the case, and wether or not a bug has been
> logged about it?  I can't seem to find one.

I doubt that mysql calls anything other than gethostbyname() or
getaddrinfo(), so your behaviour is probably dependant on whatever OS you
are running and how often its local resolver re-checks resolv.conf.  Usually
that's only once when a program starts.  If you're running bind, nscd, or
some other intermediate DNS client on your machine, bouncing that should
work.  If not, you'll need to bounce mysql.

-- 
Dan Nelson
dnel...@allantgroup.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Interesting bug/oversight

2011-05-19 Thread Johan De Meersman
- Original Message -

> From: "Claudio Nanni" 

> Consider also the DNS TTL.
That should be irrelevant when changing DNS servers :-) 

> If you flush hosts in MySQL it'll ask again the OS to resolve a name
> , but if that is still in the DNS cache it could return that 'old'
> value instead of querying the newly updated NS.
I know, but it's another DNS server so not applicable. Also, I did verify on 
the commandline :-) 

> I'm not sure thou, may be test by restarting the name server cache
> deamon /etc/rc.d/init.d/nscd restart
Not running local caching. The host only runs MySQL which has it's own cache, 
so that would be a useless layer. 

Nice try :-) 

-- 
Bier met grenadyn 
Is als mosterd by den wyn 
Sy die't drinkt, is eene kwezel 
Hy die't drinkt, is ras een ezel 


Re: Interesting bug/oversight

2011-05-19 Thread Claudio Nanni
Johan,

Consider also the DNS TTL.

If you flush hosts in MySQL it'll ask again the OS to resolve a name , but
if that is still in the DNS cache it could return that 'old' value instead
of querying the newly updated NS.

I'm not sure thou, may be test by restarting the name server cache
deamon */etc/rc.d/init.d/nscd
restart *

Claudio



2011/5/19 Johan De Meersman 

> Just encountered an interesting issue.
>
> I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the
> performance impact, that's not an issue.
>
> I just found out through failing logins that a server was still connecting
> to an old DNS server, and properly updated the resolv.conf. Commandline host
> lookups then returned correct results.
>
> However, even after repeated flush hosts commands, the MySQL kept returning
> wrong results. Only after a full restart did it pick itself up and start
> doing proper lookups. I strongly suspect that this is due to it internally
> caching the nameserver, too, and not refreshing that along with the host
> cache on a flush hosts command.
>
> Can anyone confirm this is the case, and wether or not a bug has been
> logged about it? I can't seem to find one.
>
> --
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel
>



-- 
Claudio


Interesting bug/oversight

2011-05-19 Thread Johan De Meersman
Just encountered an interesting issue. 

I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the 
performance impact, that's not an issue. 

I just found out through failing logins that a server was still connecting to 
an old DNS server, and properly updated the resolv.conf. Commandline host 
lookups then returned correct results. 

However, even after repeated flush hosts commands, the MySQL kept returning 
wrong results. Only after a full restart did it pick itself up and start doing 
proper lookups. I strongly suspect that this is due to it internally caching 
the nameserver, too, and not refreshing that along with the host cache on a 
flush hosts command. 

Can anyone confirm this is the case, and wether or not a bug has been logged 
about it? I can't seem to find one. 

-- 
Bier met grenadyn 
Is als mosterd by den wyn 
Sy die't drinkt, is eene kwezel 
Hy die't drinkt, is ras een ezel 


Re: interesting....BUG?

2004-03-29 Thread Nestor Florez
Victoria,

The seleect statements that I wrote is what I use.
And if there was a limit should the limit be used in both o f my select?

Database changed
mysql> SELECT @@session.sql_select_limit;
++
| @@session.sql_select_limit |
++
| 4294967295 |
++
1 row in set (0.02 sec)

*-
Rhino,

I enter the command manually from Myusql after I have changed
databases ( "use database") and the answers where different.
I catell you that show tables only shows :
mysql> show tables;
+-+
| Tables_in_ecrop |
+-+
| course_eng  |
| course_esp  |
+-+

I have it working by switching all my commands to access Course_Eng but I was
just wondering about this.

Thanks for your help :-)

Nestor :-)

Néstor A. Flórez


>>> Victoria Reznichenko <[EMAIL PROTECTED]> 3/22/2004 2:06:55 AM >>>
"Nestor Florez" <[EMAIL PROTECTED]> wrote:
> 
> I have a php web application that has an admin page for inserting course =
> records and one for selecting course records=20
> and a client page for selecting course record. =20
> In the admin side I insert records with an "insert into Course_Eng" and I =
> select records witha "select * from Course_Eng"
> In the client side I get records witha "select * from course_eng"
> 
> The kicker is that my client webbased select will only return 40 records =
> (no limits are being use) but my admin
> webbased select returns 200 records.  I SSH into the server and when I =
> check the table "desc course_eng"
> look good.
> After scraching my head several times I found out that if  manually typed =
> on the server
> my select statement as "select * from Course_Eng" I would get 200 records =
> back, but if I
> typed "select * from course_eng" I would get 40 records.
> 
> Is this a bug? or a feature?
> 
> Whe I did a "show tables;", the table name is  "course_eng"  ther was no =
> table "Course_Eng"
> 
> If I remember correct in the SQL syntax the case should not matter?
> 
> I change all my inserts and selects to "Course_Eng"  that seem to work and =
> returned me the most records
> My server is  a Mac OS 10.2 and the Mysql version is "server version: =
> 4.0.16"
> 

"SELECT * FROM course_eng" is the exact query that you use?
Check with SELECT @@session.sql_select_limit that it's not SQL_SELECT_LIMIT issue.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita 
This email is sponsored by Ensita.net http://www.ensita.net/ 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED] 
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com 





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql 
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: interesting....BUG? COMMENTS?

2004-03-29 Thread Victoria Reznichenko
"Nestor" <[EMAIL PROTECTED]> wrote:
> I send this last week and no one commented.

Nestor, I've already asked you check value of sql_select_limit variable:
SELECT @@session.sql_select_limit;

Is "SELECT * FROM course_eng" exact query that you use?

> Has anyone run into this simmilar problem?
> 
> -Original Message-
> From: Nestor Florez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 18, 2004 10:28 AM
> 
> 
> I have a php web application that has an admin page for inserting course
> records and one for selecting course records
> and a client page for selecting course record.
> In the admin side I insert records with an "insert into Course_Eng" and I
> select records witha "select * from Course_Eng"
> In the client side I get records witha "select * from course_eng"
> 
> The kicker is that my client webbased select will only return 40 records (no
> limits are being use) but my admin
> webbased select returns 200 records.  I SSH into the server and when I check
> the table "desc course_eng"
> look good.
> After scraching my head several times I found out that if  manually typed on
> the server
> my select statement as "select * from Course_Eng" I would get 200 records
> back, but if I
> typed "select * from course_eng" I would get 40 records.
> 
> Is this a bug? or a feature?
> 
> Whe I did a "show tables;", the table name is  "course_eng"  ther was no
> table "Course_Eng"
> 
> If I remember correct in the SQL syntax the case should not matter?
> 
> I change all my inserts and selects to "Course_Eng"  that seem to work and
> returned me the most records
> My server is  a Mac OS 10.2 and the Mysql version is "server version:
> 4.0.16"
> 
> Any ideas?
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: interesting....BUG? COMMENTS?

2004-03-26 Thread Rhino
It's been my experience that table names are case-sensitive in MySQL; you
must get the case exactly right to get data from the desired table. Mind
you, that is based on SQL issued at the command line. Your driver may make
case irrelevant for access from clients.

If your table name is 'course_eng', any "select *" query you do against it
with the same "where"/"group by" should give you the same result regardless
of whether you are running the query at the command line or from a program.

The strangest part of what you describe is that "select * from Course_eng"
returns *any* rows at all since you say this table does not exist; I have
always gotten a clear error message if I asked for rows from a table which
isn't there. Is it possible you *do* have a "Course_eng" table? Is it
possible that the "Course_eng" table is in a different database and your
program is reading it from a different database?

For instance, if your "real" table is "course_eng" and it is in database
Foo, could you have another table called "Course_eng" (note the uppercase
'C') in database Bar? If so, then maybe your program is doing a "use Bar"
and then "select * from Course_eng" while you are doing "use Foo" and then
"select * from course_eng"? I know that's probably far-fetched but it would
tend to explain the symptoms. Or could you have "course_eng" and
"Course_eng" in the same database, one with 200 rows and one with 40 rows
but a bug in MySQL is keeping you from seeing one of them??

Rhino

- Original Message - 
From: "Nestor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 26, 2004 7:38 PM
Subject: RE: interestingBUG? COMMENTS?


> I send this last week and no one commented.
> Has anyone run into this simmilar problem?
>
> -Original Message-
> From: Nestor Florez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 18, 2004 10:28 AM
>
>
> I have a php web application that has an admin page for inserting course
> records and one for selecting course records
> and a client page for selecting course record.
> In the admin side I insert records with an "insert into Course_Eng" and I
> select records witha "select * from Course_Eng"
> In the client side I get records witha "select * from course_eng"
>
> The kicker is that my client webbased select will only return 40 records
(no
> limits are being use) but my admin
> webbased select returns 200 records.  I SSH into the server and when I
check
> the table "desc course_eng"
> look good.
> After scraching my head several times I found out that if  manually typed
on
> the server
> my select statement as "select * from Course_Eng" I would get 200 records
> back, but if I
> typed "select * from course_eng" I would get 40 records.
>
> Is this a bug? or a feature?
>
> Whe I did a "show tables;", the table name is  "course_eng"  ther was no
> table "Course_Eng"
>
> If I remember correct in the SQL syntax the case should not matter?
>
> I change all my inserts and selects to "Course_Eng"  that seem to work and
> returned me the most records
> My server is  a Mac OS 10.2 and the Mysql version is "server version:
> 4.0.16"
>
> Any ideas?
>
> thanks,
>
> Néstor A. Flórez
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: interesting....BUG? COMMENTS?

2004-03-26 Thread Nestor
I send this last week and no one commented.
Has anyone run into this simmilar problem?

-Original Message-
From: Nestor Florez [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 10:28 AM


I have a php web application that has an admin page for inserting course
records and one for selecting course records
and a client page for selecting course record.
In the admin side I insert records with an "insert into Course_Eng" and I
select records witha "select * from Course_Eng"
In the client side I get records witha "select * from course_eng"

The kicker is that my client webbased select will only return 40 records (no
limits are being use) but my admin
webbased select returns 200 records.  I SSH into the server and when I check
the table "desc course_eng"
look good.
After scraching my head several times I found out that if  manually typed on
the server
my select statement as "select * from Course_Eng" I would get 200 records
back, but if I
typed "select * from course_eng" I would get 40 records.

Is this a bug? or a feature?

Whe I did a "show tables;", the table name is  "course_eng"  ther was no
table "Course_Eng"

If I remember correct in the SQL syntax the case should not matter?

I change all my inserts and selects to "Course_Eng"  that seem to work and
returned me the most records
My server is  a Mac OS 10.2 and the Mysql version is "server version:
4.0.16"

Any ideas?

thanks,

Néstor A. Flórez

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: interesting....BUG?

2004-03-22 Thread Victoria Reznichenko
"Nestor Florez" <[EMAIL PROTECTED]> wrote:
> 
> I have a php web application that has an admin page for inserting course =
> records and one for selecting course records=20
> and a client page for selecting course record. =20
> In the admin side I insert records with an "insert into Course_Eng" and I =
> select records witha "select * from Course_Eng"
> In the client side I get records witha "select * from course_eng"
> 
> The kicker is that my client webbased select will only return 40 records =
> (no limits are being use) but my admin
> webbased select returns 200 records.  I SSH into the server and when I =
> check the table "desc course_eng"
> look good.
> After scraching my head several times I found out that if  manually typed =
> on the server
> my select statement as "select * from Course_Eng" I would get 200 records =
> back, but if I
> typed "select * from course_eng" I would get 40 records.
> 
> Is this a bug? or a feature?
> 
> Whe I did a "show tables;", the table name is  "course_eng"  ther was no =
> table "Course_Eng"
> 
> If I remember correct in the SQL syntax the case should not matter?
> 
> I change all my inserts and selects to "Course_Eng"  that seem to work and =
> returned me the most records
> My server is  a Mac OS 10.2 and the Mysql version is "server version: =
> 4.0.16"
> 

"SELECT * FROM course_eng" is the exact query that you use?
Check with SELECT @@session.sql_select_limit that it's not SQL_SELECT_LIMIT issue.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



interesting....BUG?

2004-03-18 Thread Nestor Florez
People,

I have a php web application that has an admin page for inserting course records and 
one for selecting course records 
and a client page for selecting course record.  
In the admin side I insert records with an "insert into Course_Eng" and I select 
records witha "select * from Course_Eng"
In the client side I get records witha "select * from course_eng"

The kicker is that my client webbased select will only return 40 records (no limits 
are being use) but my admin
webbased select returns 200 records.  I SSH into the server and when I check the table 
"desc course_eng"
look good.
After scraching my head several times I found out that if  manually typed on the server
my select statement as "select * from Course_Eng" I would get 200 records back, but if 
I
typed "select * from course_eng" I would get 40 records.

Is this a bug? or a feature?

Whe I did a "show tables;", the table name is  "course_eng"  ther was no table 
"Course_Eng"

If I remember correct in the SQL syntax the case should not matter?

I change all my inserts and selects to "Course_Eng"  that seem to work and returned me 
the most records
My server is  a Mac OS 10.2 and the Mysql version is "server version: 4.0.16"

Any ideas?

thanks,

Nestor :-)

Néstor A. Flórez



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]