mysql timezone problem

2006-03-28 Thread averyanov
after changing my system timezone from UTC to MSD i have the following
problem: after restarting mysql server its timezone has not changet at
all:
mysql> show variables like '%zone%';
+--++
| Variable_name| Value  |
+--++
| system_time_zone | UTC|
| time_zone| SYSTEM |
+--++

meanwhile system command date says the following:
# date
Tue Mar 28 18:35:45 MSD 2006

OS: FreeBSD 6.0-RELEASE
mysql: mysql  Ver 14.12 Distrib 5.0.18, for portbld-freebsd6.0 (i386) using  5.0
  

-- 
С уважением,
  Сергей Аверьянов,
  ООО "Паллант Мобайл",
  Руководитель отдела разработок
  +7 9272 702841


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



Re: BLOCK SELECT INTO OUTFILE ?

2005-08-24 Thread averyanov

Wednesday, August 24, 2005, 5:11:14 PM, you wrote:

> Hi,

> I am going to implement a mysql hosting, and I would to make a question,
> if a mysql-user with only a "SELECT" privilege make this query:

> SELECT * FROM table1 INTO OUTFILE '/mysqldb/data/test.sql';

> the result is a file in this path with the content of the table. 
> I could think that a malicious user can do several querys like this and fill
> my disk. 
> How could I secure this command ?
According to mysql manual
"The  SELECT  ...  INTO  OUTFILE  'file_name' form of SELECT writes the
selected  rows  to  a file. The file is created on the server host, so
you  must  have the FILE privilege to use this syntax. The file cannot
currently  exist,  which  among  other  things  prevents files such as
/etc/passwd and database tables from being destroyed."

So just don't give FILE privilege to malicious users


> --
> 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: concat function problems

2005-07-29 Thread averyanov
PS
after mysql reinstallation (upgrade from 4.1.12 to 4.1.13) from source
code  with EXACTLY THE SAME ./configure options as before and the SAME
configuration file everything is OK


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



Re: concat function problems

2005-07-29 Thread averyanov
resuming all above i can say that to my greatest regret nobody even
expects what the matter is :(
so i'll just try to install a newer version of server hoping the bug
will disappear



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



Re: concat function problems

2005-07-27 Thread averyanov
>> Hello Nuno,
>> 
>> Tuesday, July 26, 2005, 8:53:33 PM, you wrote:
>> 
>> 
>>>[EMAIL PROTECTED] wrote:
>>>(...)
>>>
When i try to execute the following query 
>>>
>>>(...)
>>>
i get this error:

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:6
Current database: test
ERROR 2013 (HY000): Lost connection to MySQL server during query


but if i change my query to this one everything is fine
SELECT 
COUNT(DISTINCT field1) as value1,
CONCAT(field2, '') as value2
FROM 
table1,
table2
GROUP 
BY value2

(here CONCAT(field2, '-') is replaced with CONCAT(field2, '') )

does anyone know what the matter is?
>> 
>> 
>>>Did you try to make the first query for a second time, when you execute
>>>the second query? It seems that the server abords or closes the 
>>>connection meanwhile. Did you waited too long to write/send the query?
>> 
>> Each time i try to execute the 'buggy' query the server crashet.
>> It crashes IMMEDIATELY (without any human-perceptible timeout)
> 
> Can you provide the output of the logs?

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=258048
max_used_connections=1
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 92783 
K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

050727 10:39:41  mysqld restarted



"It is possible that mysqld could use up to 92783 K bytes of memory."
I don't think the problem has anything to do with available memory
size for
a) there is enough free memory
b) if not there is a good piece of swap
c) even if i suggest the problem is in insufficient memory it is not
clear why so much is required for execution of such a simple query


> 
>>>Check this for more help
>>>http://dev.mysql.com/doc/mysql/en/gone-away.html
> 
> Does following the steps in that page helps?
> 
>>>Try this query and output the result
>> 
>> 
>>>SHOW VARIABLES LIKE '%time%';
>> 
>> mysql> SHOW VARIABLES LIKE '%time%';
>> +--+---+
>> | Variable_name| Value |
>> +--+---+
>> | connect_timeout  | 5 |
>> | datetime_format  | %Y-%m-%d %H:%i:%s |
>> | delayed_insert_timeout   | 300   |
>> | flush_time   | 0 |
>> | innodb_lock_wait_timeout | 50|
>> | interactive_timeout  | 28800 |
>> | long_query_time  | 10|
>> | net_read_timeout | 30|
>> | net_write_timeout| 60|
>> | slave_net_timeout| 3600  |
>> | slow_launch_time | 2 |
>> | sync_replication_timeout | 0 |
>> | system_time_zone | MSD   |
>> | time_format  | %H:%i:%s  |
>> | time_zone| SYSTEM|
>> | wait_timeout | 28800 |
>> +--+---+
>> 16 rows in set (0.00 sec)
> 
> The variables seems OK.



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



Re: concat function problems

2005-07-26 Thread averyanov
Hello mysql,

>> i've got a strange problem with concat() function
>> 
>> i have the following data structure:
>> 
>> CREATE TABLE table1 (
>>   field1 int(11) NOT NULL auto_increment,
>>   PRIMARY KEY  (field1)
>> ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=3;
>> 
>> CREATE TABLE table2 (
>>   field2 varchar(255) NOT NULL default ''
>> ) ENGINE=InnoDB DEFAULT CHARSET=cp1251;
>> 
>> INSERT INTO table1 VALUES (1);
>> INSERT INTO table1 VALUES (2);
>> INSERT INTO table2 VALUES ('test');
>> 
>> When i try to execute the following query 
>> (the  query  is meaningless -- it is generated just for debug purpose.
>> the  original  query  where  the  problem  occured  is  too  long  and
>> complicated)
>> SELECT
>> COUNT(DISTINCT field1) as value1,
>> CONCAT(field2, '-') as value2
>> FROM 
>> table1,
>> table2
>> GROUP 
>> BY value2
>> i get this error:
>> 
>> ERROR 2006 (HY000): MySQL server has gone away
>> No connection. Trying to reconnect...
>> Connection id:6
>> Current database: test
>> ERROR 2013 (HY000): Lost connection to MySQL server during query
>
> This is an important point.  Do you get the reported error for the simplified 
> query below?  If not, it is useless.  To find the problem, we must have a 
> query that produces the problem.
>
Yes, i have the problem exactly in THIS query
>> SELECT 
>> COUNT(DISTINCT field1) as value1,
>> CONCAT(field2, '-') as value2
>> FROM 
>> table1,
>> table2
>> GROUP 
>> BY value2
> 
> With 4.1.11 on Mac OS X 10.3.9, I get
> 
> +++
> | value1 | value2 |
> +++
> |  2 | test-  |
> +++
> 1 row in set (0.09 sec)
> 
>> i get this error:
>> 
>> ERROR 2006 (HY000): MySQL server has gone away
>> No connection. Trying to reconnect...
>> Connection id:6
>> Current database: test
>> ERROR 2013 (HY000): Lost connection to MySQL server during query
> 
> Does the mysql server actually crash, or are you just losing the connection 
> from your client?  Have you checked the error log?  Have you checked the 
> manual <http://dev.mysql.com/doc/mysql/en/gone-away.html>?
Yes, it really crashes. mysqld restarts after that

> 
>> but if i change my query to this one everything is fine
>> SELECT 
>> COUNT(DISTINCT field1) as value1,
>> CONCAT(field2, '') as value2
>> FROM 
>> table1,
>> table2
>> GROUP 
>> BY value2
>> 
>> (here CONCAT(field2, '-') is replaced with CONCAT(field2, '') )
>> 
>> does anyone know what the matter is?
> 
> Does the simple query
> 
>SELECT CONCAT('test', '-');
> 
> work or produce the same error?
>
This query works.
This one does NOT:
SELECT
COUNT(DISTINCT field1) as value1,
CONCAT(field2, '-') as value2
FROM 
table1,
table2
GROUP 
BY value2

All of the following ones WORK fine too:
SELECT
max(field1) as value1,
CONCAT(field2, '-') as value2
FROM 
table1,
table2
GROUP 
BY value2
(here count is replaced with MAX() for experimental purposes)

SELECT
COUNT(field1) as value1,
CONCAT(field2, '-') as value2
FROM 
table1,
table2
GROUP 
BY value2
(here distinct is removed)

SELECT
COUNT(field1) as value1,
CONCAT(field2, '-') as value2
FROM 
table2,
table1
GROUP 
BY value2
(here tables order in FROM is changed)


>> ps
>> my mysql version is 
>> mysql  Ver 14.7 Distrib 4.1.12, for unknown-freebsd4.6 (i386) using  
>> EditLine wrapper
>> and my system is FreeBSD 4.6
> 
> I've not used "EditLine wrapper" with mysql.  Is there any chance it is doing 
> something with '-'?
no, i've tried other symbols too


-- 
Best regards,
 averyanov  mailto:[EMAIL PROTECTED]


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



concat function problems

2005-07-26 Thread averyanov
i've got a strange problem with concat() function

i have the following data structure:

CREATE TABLE table1 (
  field1 int(11) NOT NULL auto_increment,
  PRIMARY KEY  (field1)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 AUTO_INCREMENT=3;

CREATE TABLE table2 (
  field2 varchar(255) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=cp1251;

INSERT INTO table1 VALUES (1);
INSERT INTO table1 VALUES (2);
INSERT INTO table2 VALUES ('test');

When i try to execute the following query 
(the  query  is meaningless -- it is generated just for debug purpose.
the  original  query  where  the  problem  occured  is  too  long  and
complicated)

SELECT 
COUNT(DISTINCT field1) as value1,
CONCAT(field2, '-') as value2
FROM 
table1,
table2
GROUP 
BY value2

i get this error:

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:6
Current database: test
ERROR 2013 (HY000): Lost connection to MySQL server during query


but if i change my query to this one everything is fine
SELECT 
COUNT(DISTINCT field1) as value1,
CONCAT(field2, '') as value2
FROM 
table1,
table2
GROUP 
BY value2

(here CONCAT(field2, '-') is replaced with CONCAT(field2, '') )

does anyone know what the matter is?

ps
my mysql version is 
mysql  Ver 14.7 Distrib 4.1.12, for unknown-freebsd4.6 (i386) using  EditLine 
wrapper
and my system is FreeBSD 4.6
  

-- 
Best regards,
 Sergey Averyanov
 mailto:[EMAIL PROTECTED]


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



disk quotas in mysql

2005-04-13 Thread Sergey Averyanov
Hello
 Is there any built-in way to set some kind of disk qoutas in mysql
 (database quotas, quotas per user, etc )?

  

-- 
Best regards,
 Sergey Averyanov  mailto:[EMAIL PROTECTED]


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