Upgrade from MySQL 3.23.x to MySQL 4.1.x [InnoDB question]
Hi all, A little question... Can I upgrade directly a server with MySQL 3.23.x version which has some MyISAM databases (no problem with it) and some InnoDB databases towards MySQL 4.1.x? Or have I to do a dump and restore instead of re-use databases? wdyt? -- Cedric Gavage - [EMAIL PROTECTED] - OpenPGP: 0xED325C64 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
how to join two tables and include all records from one
Hi, I'm quite new to mysql and I need to join two tables: Items IDItems Name 1 Orange 2 Apple 3 Bread 4 Milk ... Invoice IDInvoice IDItems Qty 1001 1 10 1001 3 2 1002 2 5 ... I need to get all items and for items included in invoice (IDInvoice) the qty Results for IDInvoice = 1001 IDItem NameQty 1 Orange 10 2 Apple 0 3 Bread 2 4 Milk0 Did somebody have an idea? I tried with LEFT JOIN / RIGHT JOIN / INNER JOIN... with no success Thanks for any help Cedric -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Server Load by user/DB
Hello ! I'm trying to figure how to get how many queries are done by each DB/user and not for the whole MySQL server. How to know how many queries are done each done for each DB ? MySQL Server load is heavy and I need to know from which websites... -- Cedric - mailto:[EMAIL PROTECTED] (DH/DSS)PGP-key Server ID: 0xBDD6E604 Haute-Vitesse au Quebec | Des remises sur vos achats ? http://www.haute-vitesse.org | http://www.achatclub.ca -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MyISAM
Hi all, I have a question about MyISAM, during an UPDATE for a row, is it a row locking or a table locking? -- Cedric Gavage [EMAIL PROTECTED] http://unixtech.be - http://gavage.com - OpenPGP: 0xED325C64 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
tuning problem or bug?
Hi all, I have a question about a mysql server under Debian GNU/Linux. debian version: woody mysql version: 3.23.49-8.2 libc6 version: 2.2.5-11.2 kernel: 2.4.20 CPU: bi-P3-1266 (Compaq Server proliant) Memory: 2 Go I have often the error message Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug. Then I recompiled the libc6 package with these changes (debian use softs with shared libraries): in linuxthreads/internals.h: #define STACK_SIZE (2 * 128 * 1024) in linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h: #define PTHREAD_THREADS_MAX 4096 in /etc/sysctl.conf: fs/file-max=65536 in /etc/mysql/my.cnf: [safe_mysqld] err-log = /var/log/mysql/mysql.err open-files-limit = 8192 [mysqld] user= mysql pid-file= /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port= 3306 basedir = /usr datadir = /var/mysql/data tmpdir = /tmp language= /usr/share/mysql/english skip-locking set-variable= key_buffer=128M set-variable= max_allowed_packet=4M set-variable= table_cache=512 set-variable= sort_buffer=2M set-variable= record_buffer=2M set-variable= thread_cache=8 set-variable= thread_stack=128K set-variable= max_connections=500 set-variable= max_connect_errors=100 set-variable= wait_timeout=1 # Try number of CPU's*2 for thread_concurrency set-variable= thread_concurrency=4 set-variable= myisam_sort_buffer_size=64M I receive the error message when I have more than 255 threads at the same moment (mytop report). May be the kernel to tune? (ulimit ?) -- Cedric Gavage [EMAIL PROTECTED] - Niddle http://unixtech.be - http://gavage.com - OpenPGP: 0xED325C64 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysql limitations
Martin Hudec wrote: Hello, I would like to know what are limitations for mysql in number of records, size of records, size of tables etc. Can anyone help me please? You could see information about it on: http://www.mysql.com/doc/en/Features.html http://www.mysql.com/doc/en/Table_size.html -- Cedric Gavage [EMAIL PROTECTED] - Niddle@IRC http://unixtech.be - http://gavage.com - OpenPGP: 0xED325C64 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Quota Support
Yes, you certainly needs to chown the files to the specific user id's for filesystem quota to count the files in the user's quota. This will solve your quota needs, although I see many potential problems: - The mysql daemon needs to have access to the files. An easy solution is to chgrp mysql the files (they should already be) and then change the permissions so the group has access to them (chmod g+rwx). You could also use access control list if your system supports it. - We don't want the users to access the database files directly If a user owns a file, he can change permissions on it, modify it, delete it, etc.. The mysql daemon will not like that and it can cause all sorts of unexpected problems I guess. So the first thing to do is to NOT put the files in the user's home directory with the symlink hack. This has no advantage and the users will certainly mess with them if you do so. A complete solution might be to only chown the files, not their directory. If the user has no access to the directory, he cannot modify its files even though they are owned by him. - Database files are created at various times You cannot only have a script set the permissions correctly when the database is created and then forget about it. As the tables will be created, new files will appear and they need to be chown'ed / chmod'ed. A cron job might come in handy here. - innodb tables are different This should work with myISAM tables, but innodb stores the data in one big file shared between databases if I am not mistaken. So you need to prevent your users from using innoDB. May be other table type will have a similar problem and you might not be able to prevent users from using them. May be someone more experienced with the different table types available can enlighten us here. I never tried such a setup but I will have to soon. Any quirks I missed? Cedric Le December 11, 2002 12:06 am, Steven Adams a écrit : Well hows it spoes to work with disk qoutas if u dont chown it to the user id?? /Steve - Original Message - From: Dean Harding [EMAIL PROTECTED] To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, December 11, 2002 7:32 AM Subject: RE: Quota Support Why would you need to chown it? Your user's won't need to touch the file at all, so it should be happy being owned by mysql... I don't know, maybe it won't work... I'm not much of a Unix person - I've never touched unix since I left university :) Dean. -Original Message- From: Steven Adams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 10 December 2002 7:42 pm To: [EMAIL PROTECTED] Subject: Re: Quota Support So do u mean like this user home dir = /home/web/users/xxx then u symlink /home/web/users/xxx/mysql/database1 /usr/local/mysql/lib/database1 chown -R xxx.xxx /home/web/users/xxx/mysql/database1 Wouldent mysql get permissions errors like that? /Steve - Original Message - From: Dean Harding [EMAIL PROTECTED] To: 'Steven Adams' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 09, 2002 7:01 PM Subject: RE: Quota Support You can place the actual database files inside your user's home directory, and sym-link to them from the MySQL's data folder. That way they will contribute to the user's whole quota and you don't end up with one quota for DB and another for everything else. The drawback, of course, is that you have to limit it to one user per database (but each user could have more than one database). Dean Harding. -Original Message- From: Steven Adams [mailto:[EMAIL PROTECTED]] Sent: Monday, 9 December 2002 4:07 pm To: [EMAIL PROTECTED] Subject: Quota Support Hey, I was wondering if its possible to implant a quota system where i can give a user just say access to 2 databases which is allowed to grow to 30Mb bewteen the two of them.. What i would really like is if its possible to make mysql use the disk quota limits.. So i can give the uses say 50MB WebSpace on my server which will iclude his mysql db Thanks /Steve - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail mysql-unsubscribe- [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com
Very bad bug on FreeBSD
Hi, I am running mysql 3.23.53 on FreeBSD 4.4. I compiled mysql from source with the following configure command: --prefix=/usr/local --localstatedir=/var/db/mysql Every now and then, the server seems to change its database directory to /var/tmp. When it happens, show databases gives me the content of the /var/tmp directory! I had this problem for more than a year now, and I upgraded every time a new version was available hoping it would fix it. I noticed that the higher to load on the mysql daemon, the more likely it is to happen... So there is probably a race condition or something. The manual says mysql is less reliable on FreeBSD because of the poor multi-threading implementation. I didn't expect I'd have to restard it every day (!!) Any help would be very appreciated. Thank you, Cedric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
[Solaris 2.7] Problem: MySQL lockup
I'm using MySQL 3.23.39 on Sun UltraSparc with Solaris 2.7. MySQL is started with bin/safe_mysqld When executing many SELECT in a short time (i.e. near 200 SELECT in 1 second), the mysqld process uses more an more CPU (96%) and seems to be locked : requests (SELECT) don't receive answers and are in a waiting state. When executing mysqladmin processlist, a thread is on closing state and another is on opening state. But both work on different tables ! I have tested with MySQL 3.23.44 and problem is the same. Anybody knows this problem ? C.L. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySQLGUI problem
MySQLGUI-1.7.5 was working. Now, when I start it and put the mouse pointer over it, it disappears. Reinstalled only to get the same thing. Any ideas? cedric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
DBI.pm
/usr/bin/mysql_setpermission returns the following: Can't locate DBI.pm in @INC (@INC contains: ) Perl 5 is installed. What do I do? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SMP on Sparc/Solaris7
Hi all, Is there someone which use mysql-3.22.* or mysql-3.23.* on a UltraSparc bi cpu with Solaris7? In my case, mysqld (with all its threads ;)) is always on one cpu... the second is never used... Thanks -- Cédric Gavage [EMAIL PROTECTED] [www] http://linuxbe.org - http://bsdbe.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
SQL Problem
I have a problem adapting a multiple select to MySQL. Can someone help me ? Here is my request (Oracle format) SELECT Tactic.teamCode FROM Tactic WHERE Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE Game.gameTurn = Turn.code) AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM Game, Turn WHERE Game.gameTurn = Turn.code); I could use the following one, if it's easier to translate to MySQL SELECT Tactic.teamCode FROM Tactic WHERE Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE Game.gameTurn = 3) AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM Game, Turn WHERE Game.gameTurn = 3); Thanks Cedric Lefebvre - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: SQL Problem
In fact this does not return me what I want : If I have the tables Tactic teamCode 1 teamCode 2 teamCode 3 teamCode 4 Game teamCode1 1 teamCode2 3 GameTurn 1 teamCode4 1 teamCode2 3 GameTurn 1 Turn Code 1 My request would return me nothing while your request would return me different sets with at least Tactic.teamCode 2 / Game.TeamCode1 1 / Game.TeamCode2 3 / GameTurn 1 So your answer is not right at all. Does someone has a clue ? Cedric Lefebvre Something like SELECT Tactic.teamCode FROM Tactic t, Game g, Turn r WHERE t.teamCode g.teamCode1 AND t.teamCode g.teamCode2 AND g.gameTurn = r.code; ...and even the table Turn may not be necessary, depending on the values in your tables and what you want to do with it. - Original Message - From: Lefebvre, Cedric [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 28, 2001 14:41 Subject: SQL Problem I have a problem adapting a multiple select to MySQL. Can someone help me ? Here is my request (Oracle format) SELECT Tactic.teamCode FROM Tactic WHERE Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE Game.gameTurn = Turn.code) AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM Game, Turn WHERE Game.gameTurn = Turn.code); I could use the following one, if it's easier to translate to MySQL SELECT Tactic.teamCode FROM Tactic WHERE Tactic.teamCode NOT IN (SELECT Game.teamCode1 FROM Game, Turn WHERE Game.gameTurn = 3) AND Tactic.teamCode NOT IN (SELECT Game.teamCode2 FROM Game, Turn WHERE Game.gameTurn = 3); Thanks Cedric Lefebvre - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
secure connection (SSL/SSH tunneling) with windows client
Hi, I know this has been discussed a lot. I did read the mail archive and found lots of interesting info. Although I have a problem. We're developing a windows software that has to exchange sensitive data with a mySQL server. I read about implementing a SSH tunnel. It works well, although I have not found a free ssh client for windows. Even if I did, it would not be really helpful as we don't want to explain to our users they have to install a third party software that does IP tunneling in order to transmit data securely. Any suggestions? Even if SSL support was added to mySQL, I guess I'd still have to wait for SSL support in the client libs we use on windows (ZeosLib)... I am ready to encrypt every sensitive fields in the database, although I am wondering if the username and password will be transferred in plain text. I've seen somewhere that it isn't, but what kind of security/encryption is used and can we consider it safe? Any suggestions greatly appreciated. Cedric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
my InterBase vs mySQL benchmarks!
Hi, I am considering developing a project on mySQL or InterBase. I tried to find comparisons, benchmarks, etc, but found nothing... Could anyone point me to such documents? If anyone cares, I wrote a small PHP script to benchmark both DB.. it's really simple, but shows mySQL is faster all the times.. http://www.inetflex.com/db-bench.php?tests=100 (This will run the test on my home server, a p3 733 with 256 MB RAM and IDE drive). Both DB server are running on the box of course. Cedric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Large search engine
Hi, You are right about this, I should have thought about it. There is just one problem: A word can occur multiple times in the same documents, so the table which gives the position of a word in a doc. must give all the positions of the word. If we keep your logic, we would have to make a table for each word, and I don't think it's a good idea. Suggestions? By the way, my question was: What is faster between filtering docs and then performing a '%like%' query on relevant documents: Ex: We search for 'red sun', so we first filter the documents to keep only the ones containing red and sun, so we have at chance that some of these contains the expression 'red sun'. Then we perform a select query with where text LIKE '%red sun%' in the relevant documents. OR not using LIKE statements at all and use a word positions table to find the docs where the position of sun = the position of red + 1 Thank you, Cedric Veilleux what you'll need is: 1 table with doc_ids (and perhaps document) 1 table with words 1 table which links words to docs 1 table which gives the position of a word in a doc. create table documents (doc_id integer primary key auto_increment, document text); create table words (word_id integer primary key auto_increment, word varchar(255)); create table occurences (occ_id integer primary key auto_increment, doc_id integer, word_id integer); create table positions (pos_id integer primary key auto_increment, occ_id integer, position integer); this way you can handle "unlimited" words with "unlimited" occurences in "unlimited" documents. any other solution would force you to construct very inefficient tables, or use of blob fields which really horribly would slow down your db when adding data for example, and is generally a very very bad way you shouldn't even think of. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Large search engine
Hi, I am planning a very large search engine. I've spent some time reading the archive and I found some suggestions on how to do this. The word indexing method is a very interesting alternative to slow "...where like '%foo%';" queries. There is from 100k to 500k documents to index, each are about 10 KBytes large. Plain text. The search engine will allow complex boolean queries (AND, OR, NEAR, NOT). I have 2 plans in mind, I'd like to have opinions on what's would be the most efficient. First Way: We populate 2 tables: one containing the documents (text and ID) one containing all the words and the documents ID containing each word The idea is to first filter the documents and then to perform a query in the documents that contains at least one of the words, so we're supposed to get a decent speed. I know this is used by many people and I know it gives good results, even when searching through 100k+ documents. Although, I am wondering if there is not a way to do it without any use of LIKE statements. I really don't know if what I have in mind is a good idea, it may be completely stupid and inefficient, I have very little DB experiences. Anyways, what if in the table containing the words and the matching document ID's, we also specify where in each documents the word is located. ex: WORD| DOCS | LOCATIONS sun | 32;45;1302 | 3 ; 554,1022 ; 76,675,3445 So word sun is the third word of doc 32, the 554th and 1022th word doc 45, etc.. Then the search script will do all the job without sending any other queries. May get quite complicated but it should work, it may also be easier to process sun NEAR star (maybe this is easy to do with LIKE too, I don't know, but I saw nothing in the docs.) Thank you, Cedric Veilleux - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table
We had similar problems with version 3.23.33. For us, the fix was to move the errant tables to MyISAM. We did not need transaction support for those tables. We have since moved the tables back to BDB with MySQL version 3.23.34a. The problem seems to have been resolved in this latest update. Cedric. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 3:29 PM To: 'Stephen Faustino'; '[EMAIL PROTECTED]' Subject: RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table I can also verify that the data seems to be stored properly (from mysql's command line tool). The problem seems most likely to occur with larger text strings Anyone else? -Scott -Original Message- From: Stephen Faustino [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 2:51 PM To: '[EMAIL PROTECTED]' Subject: RE: BDB table corruption when inserting/retrieving a BLOB into a BDB table We have also experienced the same exact behavior, also using the mm.mysql driver, on Linux. However, our problem is intermittent. There are times (though these times cannot be accurately predicted) where the data is retrieved correctly, which implies that the data is stored correclty. We have verified that the data is being stored correctly by using mysql to select the data into a dumpfile. We did not try to recreate the problem with a table handler other than BDB. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation Direct/Vmail (210)402-9669x949 mailto:[EMAIL PROTECTED] This email is intended for the named recipient(s) only and may contain information that is privileged and/or confidential. Nothing in this email is intended to constitute a waiver of any privilege or the confidentiality of this message. If you have received this email in error, please notify me immediately by reply and delete this message. -Original Message- From: Scott McCool [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 1:01 PM To: '[EMAIL PROTECTED]' Subject: BDB table corruption when inserting/retrieving a BLOB into a BDB table I'm getting a very strange results all of the sudden when dealing with BLOBs in a mysql 3.23.32 on a Solaris 7 (SPARC) machine (inserts/deletes handled with the JDBC driver from http://mmmysql.sourceforge.net/) If I do the following: 1) Create a BDB table with a blob column: CREATE TABLE test4( id INTEGER not null PRIMARY KEY, ablob BLOB null ) TYPE=BDB; 2) Insert a particular blob into that column (I'm storing XSLT stylesheets in the real table, most of them work fine but one in particular is all of the sudden causing problems): ---code snip--- String fn="badblob.txt";// Filename of the blob I'm loading that causes problems FileInputStream style_fis=new FileInputStream(fn); byte[] style_bytes=new byte[style_fis.available()]; style_fis.read(style_bytes); String dQuery="delete from ttest4"; String iQuery="insert into ttest4(id,ablob) values(1,null);"; conn=cp.getConnection();// Gets a JDBC connection from a pool I keep elsewhere Statement stmt=conn.createStatement(); stmt.executeUpdate(dQuery); stmt.executeUpdate(iQuery); stmt.close(); String uQuery="update test4 set ablob=? where id=1"; pstmt=conn.prepareStatement(uQuery); pstmt.setBytes(1,style_bytes); pstmt.execute(); pstmt.close(); cp.releaseConnection(conn); ---end code snip--- (I've modified this some, but basically my code will insert an empty row then update it with the blob, this is to deal with some issues we've had with other RDBMs' implementations of JDBC). This seems to go just fine. 3) Retrieve that blob with the following code: --code snip-- conn=cp.getConnection(); Statement stmt=conn.createStatement(); String query="select ablob from ttest4 where id=1"; ResultSet rs=stmt.executeQuery(query); while(rs.next()) { Blob b=rs.getBlob(1); byte[] blobBytes=b.getBytes(0,(int)b.length()); System.out.println(new String(b)); } --end code snip-- At this point my output ends up very garbled. The output usually starts off with some very strange ASCII characters (seemingly binary data) with things like filesystem names thrown in the mix... Then at some point parts of my actual data (from the "badblob.txt" file in step 2) appears... Then the end of it is usually overwritten with more strange ASCII characters. In attempting to fix this problem, I dropped and recreated the entire database a few times, restarted the server daemon, etc. I finally ended up changing the table to TYPE=MyISAM and the problem went away. Unfortunately, I need transaction support for this project. I've been using this code, data, server version, bdb table, etc for a few weeks now with no problems, but suddenly when regenerating the schema last night this started to occur and is now happening r
SQL PRIMARY KEY question
I have written the following SQL request, but I get an error, why ? create table MovementOrder ( teamCode INT(4) NOT NULL, quarter INT(4) NOT NULL, position INT(4) NOT NULL, priority INT(4) NOT NULL, order VARCHAR(10), parameter VARCHAR(5), PRIMARY KEY(teamCode,quarter,position,priority) ); - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php