union/collation problem, error 1267: feature or bug?

2006-01-19 Thread schlubediwup
Hi mysqllers, 1. following installation localhost.addresses2> show global variables like "version%"; +-+--+ | Variable_name | Value| +-+-

Re: question about "CONTAINS SQL"

2006-01-19 Thread Paul DuBois
At 8:29 -0500 1/19/06, Rhino wrote: I am copying the rest of the list with this so that everyone may benefit from the discussion. If your routine modifies data, in other words if it does SQL Update, Insert or Delete but your routine definition says only "CONTAINS SQL", I would expect your rou

Re: question about "CONTAINS SQL"

2006-01-19 Thread wangxu
Thank you Rhino. Your description is very detailed. But my try was fail.No error has been throw out. Follow is the process. Please help me to analyse the result. -- [EMAIL PROTECTED] bin]# mysql -uroot Welcome to t

Re: question about recovery with binlog

2006-01-19 Thread wangxu
My mysql version is 5.0.16. My problem is similar to the bug. My sql mode is ANSI and TRADITIONAL If mysql can't do recovery with mysqlbinlog at my sql mode until the bug will be fixed? Follow is the information of my binlog. --

Re: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread David Godsey
I forgot to do reply all, sorry peter for the duplicate: Thank you for the responses to my question, however with a little poking around after the suggestions, I still am unable to do the conversion. mysql> select 0xABCDEF0123456789 into @fdata; Query OK, 1 row affected (0.00 sec) mysql> select

Can MySQL jobs be posted to this list?

2006-01-19 Thread Beau Gould
Thank you, Beau Gould Superior Staffing Solutions http://www.superiorss.com/jobs.htm Ruby/Rails Jobs Yahoo Group: http://groups.yahoo.com/group/rubyrails Human-Computer Interaction Jobs: http://groups.yahoo.com/group/HCIJobs Python, Zope Jobs: http://groups.yahoo.com/group/pythonzopejobs Open So

Re: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread Peter Brawley
Gordon, >... >SELECT CONVERT(fdata,BIGINT) INTO tmp_int; >SELECT HEX(tmp_int); ... Are you looking for... SELECT CAST(0xABCDEF0123456789 AS UNSIGNED); +--+ | CAST(0xABCDEF0123456789 AS UNSIGNED) | +--+ |

problem with using CONSTRAINT declaration

2006-01-19 Thread Ferindo Middleton Jr
I have the following table where I have a CHECK CONSTRAINT to check for logical data values but for some reason it's not working on INSERTs to the table. MySQL doesn't give any error message when I CREATE TABLE. Any ideas what I'm doing wrong?... or Is this type of declaration not supported...

Re: Selecting based on serialized field...

2006-01-19 Thread Peter Brawley
>is there a way to select a recordset ordered by "company"?  Kind of like, >but not quite:  SELECT * FROM mytable ORDER BY companyname >(where the "companyname" is some function that pulls out the company name) Yes you can ORDER BY a function result. PB - Subscriptions wrote: I'm n

differences between varchar and text fields

2006-01-19 Thread Tucker Cunningham
hi all - I was looking for some clarification about the difference between varchar and the text types in MySQL 5.0.18. It seems to me that varchar and text both hold text data, are variable length, and have the same storage requirements (4 + L bytes). Also, longtext adds the ability to hol

Selecting based on serialized field...

2006-01-19 Thread Subscriptions
I'm not sure if this falls under a PHP topic or a MySQL topic, but I have a table that contains a field that stores serialized data. Is there a way to order a recordset by a piece of the serialized data? For example, if a field called "data" contains serialized data that looks like this: a:1

RE: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread Gordon Bruce
I just added a user variable @fdata to get visabilility outside of the procedure and this is what I get. mysql> delimiter // mysql> create procedure test20 () ->BEGIN -> DECLARE fdata BLOB; -> DECLARE foffset INT UNSIGNED; -> DECLARE flength INT UNSIGNED;

convert help

2006-01-19 Thread David Godsey
I am trying to convert binary data to a bigint so I can do bitwise operations on the data, and I'm having trouble doing it. I noticed that if I have binary data and I: select data>>1; I get 0 (not what I'm expecting). Here is a test procedure I wrote: create procedure test20 () BEGIN

RE: Show Description options??

2006-01-19 Thread Gordon Bruce
If you are on 5.0.x you can use SELECT column_Name FROM INFORMATION_SCHEMA.columns; INFORMATION_SCHEMA is a set of VIEWS that lets you access the database structure. See http://dev.mysql.com/doc/refman/5.0/en/information-schema.html -Original Message- From: Mike OK [mailto:[EMAIL

is UNION allowed in a MySQL stored procedure?

2006-01-19 Thread Gordon Bruce
I have a simple stored procedure which works as intended. As soon as I add a UNION in the SELECT I get the error message ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select phon_Lvl INTO

Re: Select records added in last hour

2006-01-19 Thread Russell Horn
On Thu, 2006-01-19 at 11:49 -0800, Devananda wrote: > > Rather than the CURDATE() function, just use NOW(). This is perfect. Thanks. Russell -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Select records added in last hour

2006-01-19 Thread Devananda
Russell Horn wrote: I have a table containing a timestamp field, `insert_time` The manual is clear when it comes to selecting records from the past week or month, I can use: SELECT COUNT(*) FROM statistics WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= `insert_time`; What I am less sure ab

Re: Select records added in last hour

2006-01-19 Thread gerald_clark
Russell Horn wrote: I have a table containing a timestamp field, `insert_time` The manual is clear when it comes to selecting records from the past week or month, I can use: SELECT COUNT(*) FROM statistics WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= `insert_time`; What I am less sure abo

Select records added in last hour

2006-01-19 Thread Russell Horn
I have a table containing a timestamp field, `insert_time` The manual is clear when it comes to selecting records from the past week or month, I can use: SELECT COUNT(*) FROM statistics WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= `insert_time`; What I am less sure about is how I would sele

Best Configuratuion ( my.cnf ) for a DB with many users and large columns ( Images in BLOB Columns ) on a Website]

2006-01-19 Thread ESV Media GmbH
Hey, what do you think is the best configuration ( my.cnf ) for running a database, which many users access at the same time ( Website - Portal ). We´ve also saved our Pictures ( nearly 3.500 rows ) in our database. Every coloumn is round about 60-70 Kbyte, so i had to use mediumblob columns.

RE: Show Description options??

2006-01-19 Thread ISC Edwin Cruz
If you are using mysql 5.x you must be able to retrieve that you want using information_schema database Look: mysql> select version(); +-+ | version() | +-+ | 5.0.16-standard | +-+ 1 row in set (0.00 sec) mysql> use information_schema; Databas

Re: Group By over many colums

2006-01-19 Thread Marco Neves
Hi, If it didn't existed and was created with the create temporary table it will desapear when you close your corrent session. otherwise you can drop it with DROP TABLE t_sends; mpneves On Thursday 19 January 2006 16:35, Critters wrote: > Thanks! > I wrote: > > > DELETE FROM t_sends; > > CREA

Re: Group By over many colums

2006-01-19 Thread Critters
Thanks! I wrote: DELETE FROM t_sends; CREATE TEMPORARY table IF NOT EXISTS t_sends (SELECT f1 as 'domain' from sends WHERE gameID = 1) union all (SELECT f2 as 'domain' from sends WHERE gameID = 1) union all (SELECT f3 as 'domain' from sends WHERE gameID = 1) union all (SELECT f4 as 'domain' fro

Show Description options??

2006-01-19 Thread Mike OK
Hi I was looking for a command that will list the names of my columns only. I have investigated show columns but there seems to be no way to return just the names. Any suggestions?? Thanks Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Group By over many colums

2006-01-19 Thread Marco Neves
Hi Critters, The problem is that as your MySQL is 4.0.21 don't suport the subselect you would need to do the group. I was thinking and you have another alternative: CREATE TEMPORARY table tdata (SELECT f1 as 'domain' from sends) union all (SELECT f2 as 'domain' from sends) unio

Re: Error from mysqldump

2006-01-19 Thread Rhino
Just as a followup to my own remarks, I've tried running my backup script with the new syntax that Gerald suggested. I was going to wait for the normal daily backup but I was eager to see if the new version would work better so I just ran it from the command line. Unfortunately, it came back w

Re: Group By over many colums

2006-01-19 Thread Critters
Thanks for the replies Marco... mysql Ver 12.22 Distrib 4.0.21 So that could be it? By the way... (SELECT f1 as 'domain' from sends) union (SELECT f2 as 'domain' from sends) union (SELECT f3 as 'domain' from sends) union (SELECT f4 as 'domain' from sends) Works, and returns a list where f1, f

Re: INSERT encrypted data

2006-01-19 Thread sharif islam
On 1/19/06, Gleb Paharenko <[EMAIL PROTECTED]> wrote: > Hello. > > What doesn't work? In case you want more help please, provide the > results you want obtain from your query and CREATE statement for you table. Sorry for not being clear. The data is getting saved as NULL instead of being encrypted

Re: Group By over many colums

2006-01-19 Thread Marco Neves
Hi, Before anything else I would verify that your mysql-server is 4.1 or superior, as before that MySQL didn't suported sub-selects. It looks to me that the error should be that. After that I only spot the missing table alias before the Group by. mpneves On Thursday 19

Re: Group By over many colums

2006-01-19 Thread Critters
The actual table is called "sends" and the data is like this: | id | f1 | f2 | f3 | | 3 | foo.com | yahoo.com| | | 4 | dsl.pipex.com | foo.com| foo.com| | 5 | vodafone.com

RE: Regarding the date values loading into the tables from a text file

2006-01-19 Thread lakshmi.narasimharao
Hi, From the front end I need to use double slashes i.e (\\) to enter one slash (\) into the MySQL database. I.e, if I enter "Gelb\Paha", it stores in the mySQL as "GlebPaha", If I enter "S\\Greeen", it stores as "S\Green" in the database. Is there any way in MySQL so that I can enter any

Re: Error from mysqldump

2006-01-19 Thread Rhino
- Original Message - From: "gerald_clark" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]> Cc: "mysql" Sent: Thursday, January 19, 2006 9:30 AM Subject: Re: Error from mysqldump Rhino wrote: I have an automated backup script that has been running daily for a couple of years now

Re: Group By over many colums

2006-01-19 Thread Marco Neves
Hi, To this on I just see a solution, that depends on sub-selects, so it's available from Mysql 4.1 forward: SELECT name,count(*) from ((SELECT name1 name FROM ) UNION ALL (SELECT name2 name FROM ) UNION ALL (SELECT name3 name FROM )) tab GROUP by name; Hope this solves you problem. mpneves

RE: Group By over many colums

2006-01-19 Thread Patrick Herber
I would suggest a union SELECT name, count(*) FROM (SELECT name1 as name from mytable union select name2 as name from mytable union select name3 as name from table) GROUP BY name but perhaps there's a better way... Regards, Patrick > -Original Message- > From: Critters [mailto:[EMAIL

Group By over many colums

2006-01-19 Thread Critters
Hi I have a table setup like this: id, name1, name2, name3 Which has data like this: 1, Dave, Bob, Simon 2, Joe, Tim, Dave 3, Dave, Bob, Tom I can run SELECT name, count(id) FROM GROUP BY name1 ORDER BY count(id) DESC Which would give me: Dave, 2 Joe, 1 But how would I go about getting th

Re: Error from mysqldump

2006-01-19 Thread gerald_clark
Rhino wrote: I have an automated backup script that has been running daily for a couple of years now. It has never given me trouble until the last two days. For the last two days, I have been getting this message when backing up my newest database: /usr/bin/mysqldump: Got error: 1064: You ha

Error from mysqldump

2006-01-19 Thread Rhino
I have an automated backup script that has been running daily for a couple of years now. It has never given me trouble until the last two days. For the last two days, I have been getting this message when backing up my newest database: /usr/bin/mysqldump: Got error: 1064: You have an error in

Re: question about "CONTAINS SQL"

2006-01-19 Thread Rhino
I am copying the rest of the list with this so that everyone may benefit from the discussion. If your routine modifies data, in other words if it does SQL Update, Insert or Delete but your routine definition says only "CONTAINS SQL", I would expect your routine to fail at runtime. I can't say

Best Configuratuion ( my.cnf ) for a DB with many users and large columns ( Images in BLOB Columns ) on a Website

2006-01-19 Thread ESV Media GmbH
Hey, what do you think is the best configuration ( my.cnf ) for running a database, which many users access at the same time ( Website - Portal ). We´ve also saved our Pictures ( nearly 3.500 rows ) in our database. Every coloumn is round about 60-70 Kbyte, so i had to use mediumblob columns.

Import from another db....

2006-01-19 Thread ESV Media GmbH
Hi everyone, how can i import a database export from another database. I´ve got alway a permission error... I used mysqlimport & mysqldump... Thanks in advance Marco Schierhorn -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.c

Re: INSERT encrypted data

2006-01-19 Thread Gleb Paharenko
Hello. What doesn't work? In case you want more help please, provide the results you want obtain from your query and CREATE statement for you table. sharif islam wrote: > mysql> insert into ccard values(AES_ENCRYPT(123453535,'uiwuerw'),'10/2003'); > Query OK, 1 row affected (0.00 sec) > > mysq

Re: Interesting Query Problem

2006-01-19 Thread Marco Neves
Hi, An alternative for any MySQL version (from 3.23.??) would be: SELECT r1.question_id,count(r1.member_id) FROM Records r1 LEFT JOIN Records r2 ON r1.question_id=r2.question_id AND r2.member_id= WHERE r2.question_id IS NULL;

Re: Interesting Query Problem

2006-01-19 Thread Gleb Paharenko
Hello. Perhaps this will work (depends on the version of MySQL you're using): select question_id , count(*) from Records group by question_id having question_id not in ( select distinct question_id from Records r wher

Re: Install help on Linux: I cant obtain access

2006-01-19 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/refman/5.0/en/access-denied.html Wade Smart wrote: > 01182006 1627 GMT-6 > > Im on Ubuntu. I have mysql 4.0.24. I have phpmyadmin installed. > Im a little frustrated at this point so bear with me. > Mysql is running. > My book says type in: mysql -h localh

Re: 16 vs 41 byte password hashes

2006-01-19 Thread Gleb Paharenko
Hello. Most probably the reason is in old_passwords in your configuration file. You can check this with the following statement: show variables like 'old_passwords'; Gary Huntress wrote: > I have a new installation of MySQL 5.0 (I did not port an old ver). I > am running a Ruby on Rails appl

Re: Timezone settings

2006-01-19 Thread Gleb Paharenko
Hello. See: http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html [EMAIL PROTECTED] wrote: > Dear Friends, > I need to do the timezone settings so that now() gives the system > time.Actually first i have installed mysql on a different timezone han > changed the system time zone but per

Re: problem on mysql.sock and mysql.host

2006-01-19 Thread Gleb Paharenko
Hello. Have you run mysql_install_db? See: http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html Chen Abella wrote: > i cant start mysql. > error in the log says: > Fatal error: Can't open and lock privilege tables: > Table 'mysql.host' doesn't exist > > service configuration s

Re: question about recovery with binlog

2006-01-19 Thread Gleb Paharenko
Hello. Are you sure that the bug is thrown by mysqlbinlog? May be you're getting this while importing the output produced by mysqlbinlog? Have a look here: http://bugs.mysql.com/bug.php?id=13897 Check that you're using the same versions of mysql client and mysqlbinlog. wangxu wrote: > Mysql

question about recovery with binlog

2006-01-19 Thread wangxu
Mysqlbinlog throw out a error "ERROR 1231 (42000) at line 10: Variable 'sql_mode' can't be set to the value of '501481487'" when i recovery a binlog. What can i do?

problem on mysql.sock and mysql.host

2006-01-19 Thread Chen Abella
i cant start mysql. error in the log says: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist service configuration says: mysqld dead but subsys locked. i can't find any mysql.sock in /var/lib/mysql i reinstalled MySQL through yum but error is still the same.

problem on mysql.sock and mysql.host

2006-01-19 Thread Chen Abella
i cant start mysql. error in the log says: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist service configuration says: mysqld dead but subsys locked. i can't find any mysql.sock in /var/lib/mysql i reinstalled MySQL through yum but error is still the same.

RE: MySQL 5.0 error after upgrade

2006-01-19 Thread Kerry Frater
Thanks, I'll look to see how to use the system. But you are right that there is an issue somewhere given that the automatic code produced by Administrator, Control Centre and Browser all have problems with communicating with the tables following the upgrade. Kerry -Original Message- Fro