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