From: Date: July 3 2009 1:57pm Subject: Re: bzr commit into mysql-5.1-bugteam branch (kristofer.pettersson:2994) Bug#37274 List-Archive: http://lists.mysql.com/commits/77893 Message-Id: <4A4DF228.3000707@sun.com> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; format=flowed Content-Transfer-Encoding: 7BIT Gleb Shchepa skrev: > Kristofer Pettersson wrote: > >> + query= "select DATABASE(), USER() limit 1"; >> + if (mysql_real_query_for_lazy(query, strlen(query))) >> > > IMO it is better to use STRING_WITH_LENGTH macro. > > Ok, yellow it is... ;-) >> + return 0; >> >> > > >> tee_puts("--------------", stdout); >> usage(1); /* Print version */ >> > > The current client prints this things always, but your patch does not. > Is it ok? > > Yes >> - if (connected) >> + tee_fprintf(stdout, "\nConnection id:\t\t%lu\n",mysql_thread_id(&mysql)); >> + /* >> + Don't remove "limit 1", >> + it is protection againts SQL_SELECT_LIMIT=0 >> + */ >> + query= "select DATABASE(), USER() limit 1"; >> > > The last string is not necessary. > > Fixed. >> + Cheers, Kristofer