Storing Images In MySQL

2004-09-29 Thread Ed Lazor
I figured I'd post a follow-up to the discussion earlier this week on issues relating to storing images in MySQL. In my opinion. Whether you store images in MySQL ultimately depends on whether you can setup a caching accelerator (like Squid) between you and your visitors. Storing images in th

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Aleksander V. Dyomin
В Чтв, 30.09.2004, в 00:37, [EMAIL PROTECTED] пишет: > I have another technique for this kind of data merge that speeds things up > (a lot!) but it requires a third table to make it work > > Please post the results of SHOW CREATE TABLE for both the source data > table and the destination data ta

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Aleksander V. Dyomin
В Чтв, 30.09.2004, в 00:50, Keith Ivey пишет: > Aleksandr V. Dyomin wrote: > > >$key='somekeyvalue'; > >dbquery("update sometable set count=count+1 where keyfield='$key'"); > >if(mysql_affected_rows()<1) > > dbquery('insert into sometable set keyfield='$key', count=1'); > > > > Another possib

Re:RE: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread Jeremy March
> Now by our reconing the key of the > fields is 343 bytes, encoding in UTF8 makes that key 343 bytes Not > 1000 > since under utf8 each character is encode in 8 bits. If it is > converting to > utf16 internally then the key would be 328*2+5+4 which is not >1000 > bytes. > If you only use the as

Re: Different default collation in each connection

2004-09-29 Thread Jeremy March
> Ok, I thought that I will be misunderstood... > > I'll try to explain this in example below: > > I have table > > CREATE TABLE `product_descriptions` ( > `id_product_description` mediumint(8) unsigned NOT NULL auto_increment, > `id_product` mediumint(8) unsigned NOT NULL default '0', >

Re: Newbie question - Input limitations on mysql client?

2004-09-29 Thread Andrew Kreps
On Wed, 29 Sep 2004 10:05:29 -0400, Ted Byrne <[EMAIL PROTECTED]> wrote: > > Is the apparent line length limit a restriction imposed by the client? (And > does it apply if you are piping or redirecting output from another process > or a file?) > It sounds like you should either be using a script

RE: importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao
Thanks, it is working for the mentioned format. Is there any method for importing directly the spooled file from oracle without changing the file format into the required format like using tab and newline. thanks, narasimha -Original Message- From: Andrey Hristov [m

Re: table is full

2004-09-29 Thread Jeremy Zawodny
On Wed, Sep 29, 2004 at 05:24:42PM -0500, Qunfeng wrote: > Hi, > > I am running 4.1.0-alpha on a linux machine. When I use mysqlimport to load > a big data file (~7 Gb), I get an error "mysqlimport: Error: The table > 'mytable' is full, when using table: mytable. > > I guess the table is too bi

Disk interference when running 2 databases

2004-09-29 Thread Gokul Soundararajan
Hi, I am running 2 database on the same MySQL server on one machine. When running this configuration, I notice that the disk usage is very high. On other hand, If run just one workload, the disk usage is very low. To be certain, I ran 2 servers running 1 database each on different ports. I see the

table is full

2004-09-29 Thread Qunfeng
Hi, I am running 4.1.0-alpha on a linux machine. When I use mysqlimport to load a big data file (~7 Gb), I get an error "mysqlimport: Error: The table 'mytable' is full, when using table: mytable. I guess the table is too big. Is there any solution for this problem? Thanks a million! Qunfeng -

Alter table from myisam to innodb in one go?

2004-09-29 Thread harm
Hello, if you do an alter table, altering some indexes _and_ converting it to innodb, will mysql do the altering and converting in one pass, or will it first change the indexes and than start the innodb conversion? For example, with an myisam table: alter table my_table, drop index an_index, add

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Keith Ivey
Aleksandr V. Dyomin wrote: $key='somekeyvalue'; dbquery("update sometable set count=count+1 where keyfield='$key'"); if(mysql_affected_rows()<1) dbquery('insert into sometable set keyfield='$key', count=1'); Another possibility would be INSERT IGNORE INTO sometable SET keyfield = '$key',

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread SGreen
I have another technique for this kind of data merge that speeds things up (a lot!) but it requires a third table to make it work Please post the results of SHOW CREATE TABLE for both the source data table and the destination data table and I will show you how it works. Thanks, Shawn Green Dat

Re: importing data into mysql from oracle using a text file

2004-09-29 Thread Andrey Hristov
Hi, I did imported your data im my server but I had to do some changes to sample.txt. I have replaced in a text editor "\t" with empty string. is a real tab while \t is just a text. Additional change was to replace "\n" (which is text but not newline with empty string). The I did the following (b

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Aleksander V. Dyomin
Thanx for reply! В Срд, 29.09.2004, в 23:21, Jim Grill пишет: > > $key='somekeyvalue'; > > dbquery("update sometable set count=count+1 where keyfield='$key'"); > > if(mysql_affected_rows()<1) > > dbquery('insert into sometable set keyfield='$key', count=1'); > > --- > > > > First question: this is

Re: Help with PHP to MySQL db connection

2004-09-29 Thread Wesley Furgiuele
This is really just a PHP question, I think. Are MySQL and Apache running on the same machine? What version of MySQL are you running? Typically, you need a PHP mysql_connect() call including the MySQL host, username, and password. You only list the host above. With a default installation of MySQ

Re: (if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Jim Grill
> Hi! > > Sorry for my ugly English. > I use mysql in my PHP script(for calculating INs and OUTs from site). > And I meet some strange thing there. > > Example goal: store statistics for clicks on some links. > I use next algorithm: > > --- > $key='somekeyvalue'; > dbquery("update sometable set cou

Re: display only populated fields

2004-09-29 Thread Rhino
- Original Message - From: "Tracy Gems" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 28, 2004 5:59 PM Subject: display only populated fields > > How do I go about only displaying fields that have data and are not empty or have NULL? > > It's a 112 column table so

mysqldump: Error 2013

2004-09-29 Thread David Perron
Hello - Since recently switching from MyISAM to InnoDB tables in 4.1 on RH Linux I receive this error when attempting to dump some tables. mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `campaigns` at row: 14721 Any idea what could be causing this? -

Re: display only populated fields

2004-09-29 Thread SGreen
If you are using something to run this query, what is it? What tool(s) are you using to retrieve/view the data? Shawn Green Database Administrator Unimin Corporation - Spruce Pine Tracy Gems <[EMAIL PROTECTED]> wrote on 09/28/2004 05:59:08 PM: > > How do I go about only displaying fields that

display only populated fields

2004-09-29 Thread Tracy Gems
How do I go about only displaying fields that have data and are not empty or have NULL? It's a 112 column table so I only want to display the fields that have data. Thanks. select * from table where . - Do you Yahoo!? Yahoo! Mail is new

RE: weird kind of join

2004-09-29 Thread Gordon
You might also try FROM table_a INNER JOIN table_b ON table_b.code = substring_index(table_a.code,';',1) SUBSTRING_INDEX(str,delim,count) Returns the substring from string str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final deli

RE: **[SPAM]** Help with PHP to MySQL db connection

2004-09-29 Thread Jay Blanchard
[snip] $dbhost = 'localhost'; [/snip] Try changing this to 127.0.0.1 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

(if !update then insert) sequence - result Duplicate key :(

2004-09-29 Thread Aleksandr V. Dyomin
Hi! Sorry for my ugly English. I use mysql in my PHP script(for calculating INs and OUTs from site). And I meet some strange thing there. Example goal: store statistics for clicks on some links. I use next algorithm: --- $key='somekeyvalue'; dbquery("update sometable set count=count+1 where keyf

Help with PHP to MySQL db connection

2004-09-29 Thread Andrew Lietzow
Hola, MySQL wizards. I'm using LAMP on Fedora Core 2. Some kind soul produced a tutorial on the net and the first script, , I am trying to use yields an error in the browser of: < Couldn't connect to MySQL > Here is the script. --- Birthdays Create Database $dbho

Re: weird kind of join

2004-09-29 Thread SGreen
try this (not tested): FROM table_a INNER JOIN table_b ON table_b.code LIKE concat(table_a.code,';%') or this: FROM table_a INNER JOIN table_b ON table_b.code RLIKE concat('^',table_a.code,';') http://dev.mysql.com/doc/mysql/en/String_comparison_functions.html http://dev.mysql.

Re: full text search question

2004-09-29 Thread Wesley Furgiuele
Laura: Perhaps the "-" is acting like a Boolean operator. What if you put double quotes around your search phrase: SELECT * FROM metadata WHERE MATCH( type ) AGAINST ( '+"XY-11443"' IN BOOLEAN MODE ); Wes On Wed, 29 Sep 2004 13:22:54 -0400, Laura Scott <[EMAIL PROTECTED]> wrote: > > > Hello,

full text search question

2004-09-29 Thread Laura Scott
Hello, I have a questions with limitations/restrictions that are around for full text search. I have a field with data like "XY-11443;." and I need to find the record. The original developer was using full text search and says that all was working before the task switched hands. The basic

RE: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread Kevin Cowley
Kevin Cowley R&D Tel: 0118 902 9099 (direct line) Email: [EMAIL PROTECTED] Web: http://www.alchemetrics.co.uk > -Original Message- > From: gerald_clark [mailto:[EMAIL PROTECTED] > Sent: 29 September 2004 17:29 > To: Kevin Cowley > Cc: [EMAIL PROTECTED] > Subject: Re: Indexing problem w

InnoDB backup + replication problem?

2004-09-29 Thread Don MacAskill
I've got an interesting (well, I think so anyway) problem with my replication. The slave chugs along just fine, then spits out: Query caused different errors on master and slave. Error on master: 'Can't execute the query because you have a conflicting read lock' (1223), Error on slave: 'no erro

RE: importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao
Title: Re: importing data into mysql from oracle using a text file The sample lines are like this in alarm.txt   ARRIVED   DETECTED  NAME  TYPE ALARMLEVEL V DISCLOSED CATEGORY_NUM   EVENTID    - - ---

weird kind of join

2004-09-29 Thread Diana Castillo
is there anyway to do a joint between a table that has codes like this 10004;XXX or DE;YYY with a table that has just the first part e.g 10004 or DE as the code There is no set length to the code , all I know is that it is the part before the semicolon. so, I can't say FROM table_a INNER JOIN

Re: importing data into mysql from oracle using a text file

2004-09-29 Thread Andrey Hristov
Can you post one or 2 sample lines from alarm.txt ? Regards, Andrey P.S. (i am not on [EMAIL PROTECTED] so add me to the CC:) [EMAIL PROTECTED] wrote: Hi, I tried with the spool option to get the data from the tables in the oracle. For this go to pl/sql editor, go to file menu, select

Re: Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread gerald_clark
Kevin Cowley wrote: Running 4.1.4 with a database that has a default encoding of UTF8 If we execute the following we get an error. CREATE TABLE idxbe_resident ( urn INT UNSIGNED NOT NULL, keyAddress_Part1 CHAR(5) BINARY NOT NULL, dataPerson_Name CHAR(60), dataAddress_Part1 CHAR(140), dataAddress_P

MySQL Users Conference 2005 - Call for Papers is Open

2004-09-29 Thread Nils Valentin
Hi MySQL community, As some of you, I did a presentation at the UC2004 about "Using MySQL in a Japanese environment - and avoiding common pitfalls", which can also be found online. http://www.be-known-online.com/mysql/ During the first 6 months I had so far 250 downloads, only for this single

Re: merging of two tables using temp tables???

2004-09-29 Thread Michael Stassen
bruce wrote: thanks for the reply... and my bad on the diff between the sql. the actual sql had ~100 values. (i simply cut it to demonstrate what i'm trying to do!!) i took the two tables created by the initial sql statements and modified them so that they both had the same structure. i then added/

RE: merging of two tables using temp tables???

2004-09-29 Thread SGreen
First, may I suggest a few changes to your original queries: select u2.universityID as ID, u2.urltype as type, u4.username as user, u3.itemID as ID2, u1.ID as uID from universityTBL as u1 join university_urlTBL as u2 on u2.universityID = u1.ID join

Maximum Key Buffer Size

2004-09-29 Thread Ian Mahaney
Is there a maximum key buffer size that can be configured in mysql-4.0.20. I had the key buffer set to 4GB and when looking at key_reads vs. key_read_requests they were almost identical indicating that all reads were actually going to physical disk. I then double checked this by using Mysql Admin

Re: mysql logs too much

2004-09-29 Thread Paul DuBois
At 12:52 +0530 9/29/04, Kausalya Ramaswamy wrote: Does mysql 4.0 onwards log cached querries also or only direct non cached database access queries? i am getting enormous amount of log in the form of querries. ours is a databse driven website using mysql and php.thanks for the reply in advance If y

RE: merging of two tables using temp tables???

2004-09-29 Thread bruce
thanks for the reply... and my bad on the diff between the sql. the actual sql had ~100 values. (i simply cut it to demonstrate what i'm trying to do!!) i took the two tables created by the initial sql statements and modified them so that they both had the same structure. i then added/deleted/etc

Indexing problem with UTF8 in 4.1.4?

2004-09-29 Thread Kevin Cowley
Running 4.1.4 with a database that has a default encoding of UTF8 If we execute the following we get an error. CREATE TABLE idxbe_resident ( urn INT UNSIGNED NOT NULL, keyAddress_Part1 CHAR(5) BINARY NOT NULL, dataPerson_Name CHAR(60), dataAddress_Part1 CHAR(140), dataAddress_Part2 CHAR(128), IND

importing data into mysql from oracle using a text file

2004-09-29 Thread lakshmi.narasimharao
Title: Message     Hi,    I tried with the spool option to get the data from the tables in the oracle. For this go to pl/sql editor, go to file menu, select spool, asks for a file name give the file name you want, later type the select command from which you want t

Re: merging of two tables using temp tables???

2004-09-29 Thread Michael Stassen
Bruce, My first thought was the LEFT JOIN Jacques suggested. My second thought was that it would be better to just create a single query that gets what you want in the first place. So I looked a little closer, and now I'm confused. At the end of your message, you include 2 queries that you sa

InnoDB crash issue

2004-09-29 Thread Ian Gulliver
This isn't a repeatable bug, but it is certainly a repeating one. We have issues on multiple machines running 4.0.20-Max-log with different data sets (in highly similar table structures) with InnoDB hanging and eventually crashing itself to get out of deadlock. Log is attached. There's only one I

RE: merging of two tables using temp tables???

2004-09-29 Thread bruce
hey shawn!!! got your msg about helping speed up the mysql!!! thanks. i got to thinking that if the sql/interactions where the issue, why not rewrite the app to reduce the number of round trips to hit the db for a given page to be displayed.. the following sql statements are used to produce the t

Newbie question - Input limitations on mysql client?

2004-09-29 Thread Ted Byrne
Greetings, I posted this to the MySQL Newbie forum, but have not received a response. Any feedback would be appreciated. -tb Environment: mysql server v4.0.13 (Win2K) mysql client v5.0.0.0(Win2K) In attempting to (manually) insert records with some rather lengthy strings, I pasted the insert st

Re: newbie installation question

2004-09-29 Thread SGreen
Machine (operating system) rights and database rights are two, very separate, permissions systems. MySQL maintains it's own access control lists, separate and distinct, from your operating system. You cannot see any other tables when you use your database tool because you are authenticating t

log_slave_updates without restarting

2004-09-29 Thread Crouch, Luke H.
is there a way to turn on log_slave_updates on a server without having to restart it? -L Luke Crouch 918-461-5326 [EMAIL PROTECTED]

Re: merging of two tables using temp tables???

2004-09-29 Thread SGreen
If you post your two "original" SQL statements (the ones you use to build your example tables) I think I can help you to merge your results, possibly without the need for temporary tables. Also, what version of MySQL are you using? Shawn Green Database Administrator Unimin Corporation - Spruce

A run away query?

2004-09-29 Thread Jay Blanchard
SELECT COUNT(DISTINCT( `cycle_flag`)) as numCycles FROM `crmReserve01`.`tblCDR` WHERE `cycle_flag` LIKE '___20__C_' and when I do an EXPLAIN ++---+---++-+--+ -+--+ | table | type | possible_keys | key| key_l

best way to restore remote database

2004-09-29 Thread Rich Brant
Hi all, I have a bunch of tables I need to create on a remote database. The backup files are all in one folder. They are .frm,.myd and.myi files. 1. Do these files need to be on the remote server in order to be used as to create the table? 2. Looking at the user docs on myslq, it appears I need

Re: Update a portion of text in a field

2004-09-29 Thread Aman Raheja
You'll get many results if you search for "mysql update replace" in google. You'd be using a combo of update-replace to do what you need. Aman Raheja Jacques Jocelyn wrote: Hello mysql, Something I have been thinking about without any clue on how I can achieve it. I know how to update a field w

RE: merging of two tables using temp tables???

2004-09-29 Thread bruce
thanks for the response... however, the attempt at using the left join/where construct was what i had initially tried, with no luck. (which is not to say i was implementing it correctly!!) using the basic select * from/left join on /where seems to give a resulting table that only contains a subse

ndb_mgmd

2004-09-29 Thread Ben David, Tomer
Hi I installed these packages on linux MySQL-client-4.1.5-0.i386.rpm MySQL-server-4.1.5-0.i386.rpm MySQL-Max-4.1.5-0.i386.rpm I want to run mysql in a cluster, however I cant find ndb_mgmd Anything I should have installed and didnt ? -- MySQL General Mailing List For list archives: http://

CREATE VIEW gets all mangled up when doing SHOW CREATE VIEW

2004-09-29 Thread Martijn Tonies
Hi there, I'm testing MySQL 5.0.1 a bit - and I noticed the following... When executing this: create view myview2 (t0) as select c1 from t It returns this when doing a SHOW CREATE VIEW myview2: CREATE VIEW test.myview2 AS select `test`.`t`.`c1` AS `t0` from `test`.`t` This is not at all what I

newbie installation question

2004-09-29 Thread Morten Pedersen
sorry for spamming the list with this, i tried asking on the forums, but didn't receive a reply. i'm a complete newbie to mysql/php, but have programmed professionally (in C/C++/ASM) for about 9 years now. i originally installed mysql into C:/Program Files/mysql, before deleting and reinstalli

mysql logs too much

2004-09-29 Thread Kausalya Ramaswamy
Does mysql 4.0 onwards log cached querries also or only direct non cached database access queries? i am getting enormous amount of log in the form of querries. ours is a databse driven website using mysql and php.thanks for the reply in advance Thanks & Regards Kausalya Ramaswamy Scientific Of

Re: Auto indexing

2004-09-29 Thread Alec . Cawley
clinton lopez <[EMAIL PROTECTED]> wrote on 29/09/2004 09:54:04: > Hi. > > I'm relatively new to the database systems. I've read > from tutorials how to create indexes in tables. How > can I refresh the created index of a table as I insert > entries into it (in order to reflect the added entry > i

Auto indexing

2004-09-29 Thread clinton lopez
Hi. I'm relatively new to the database systems. I've read from tutorials how to create indexes in tables. How can I refresh the created index of a table as I insert entries into it (in order to reflect the added entry in the index)? Any help would be very much appreciated. Thanks! Clinton Lope

Re: Unable top drop table, error 1051

2004-09-29 Thread Markus Fischer
Egor Egorov wrote: Bug filled: http://bugs.mysql.com/bug.php?id=5784 Thank you! Nice, thanks to you too ;-) regards, - Markus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Cast a value as datetime using Mysql prior to 4.0

2004-09-29 Thread Iago Sineiro
Hi. In MySql 4.0 you can use the function CAST to cast a value as datetime: CAST(value AS DATETIME), but in versions of MySql you can't. How can I do this cast in other versions of MySql? Iago. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:ht