Re: UDF on AMD64
Well that was easy. After reading your response I went back and used gcc -fPIC -c xxx.cc gcc -shared -o xxx.so xxx.o and all was well again. Thanks for your help..again. Ollie Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I'm back with another question. I tried to compile my UDF with the gcc on my Opteron system and I got errors. Errors: /usr/lib64/gcc-lib/amd64-mandrake-linux- gnu/3.3.1/../../../../lib64/crt1.o(.text+0x21): In function `_start': ../sysdeps/x86_64/elf/start.S:92: undefined reference to `main' What is your gcc line? The above error indicates that you are trying to build an executable. UDFs must be shared object files. http://www.mysql.com/doc/en/UDF_compiling.html -- Dan Nelson [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
UDF on AMD64
Hi, I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Thanks, Ollie --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
Thanks Dan. I will get to it then. Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Yes; UDFs are native machine binaries, and I doubt a 32-bit UDF .so would even load into a 64-bit mysqld. -- Dan Nelson [EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: UDF on AMD64
I'm back with another question. I tried to compile my UDF with the gcc on my Opteron system and I got errors. Errors: /usr/lib64/gcc-lib/amd64-mandrake-linux-gnu/3.3.1/../../../../lib64/crt1.o(.text+0x21): In function `_start': ../sysdeps/x86_64/elf/start.S:92: undefined reference to `main' /root/tmp/ccY5pYQZ.o(.text+0x1a9): In function `DIST': : undefined reference to `sin' /root/tmp/ccY5pYQZ.o(.text+0x1c6): In function `DIST': : undefined reference to `sin' /root/tmp/ccY5pYQZ.o(.text+0x1ec): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x209): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x249): In function `DIST': : undefined reference to `cos' /root/tmp/ccY5pYQZ.o(.text+0x29a): In function `DIST': : undefined reference to `sqrt' /root/tmp/ccY5pYQZ.o(.text+0x2a4): In function `DIST': : undefined reference to `atan' /root/tmp/ccY5pYQZ.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status Here are my header includes. #ifdef STANDARD #include stdio.h #include string.h #else #include my_global.h #include my_sys.h #endif #include math.h #include mysql.h #include m_ctype.h #include m_string.h I can't paste the rest of the code. Sorry. Is there special coding I need to do for AMD64 when writing a UDF? Maybe someone can point me to a sample UDF that compiled on AMD64. Thanks, Ollie Dan Nelson said: In the last episode (Dec 11), Ollie Gallardo said: I just recently built myself a dual Opteron system and installed mysql for AMD64 on it. I previously ran my databases on regular 32 bit systems and had my UDF working fine. The UDF is written in C. Before I try and install the UDF on the new system should I recompile it using AMD64 libraries? Yes; UDFs are native machine binaries, and I doubt a 32-bit UDF .so would even load into a 64-bit mysqld. -- Dan Nelson [EMAIL PROTECTED] --- Ollie Gallardo Support Services Inc 2 Professional Dr Ste 212 Gaithersburg MD 20879 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Merge records from multiple tables???
Hi, I am a newcomer to mysql (and pretty much to sql in general). I have a question that is probably pretty simple to answer, but it is escaping me at present. I want to select records from two separate tables and put the results into a result table. Seems pretty simple, but I don't want to join the records from the two tables into combined records in the result table but rather keep them as separate records in the result table. Perhaps an example would clarify what I want to do. Suppose I have two tables of data, such as a current invoice file and an invoice history file. Suppose I need to do a report that would include all records from both files. For the life of me, I don't see how to accomplish this. For the old-timers out there, this was called a merge in an earlier era of data processing. Thanks for any pointers. Ollie -- |---| | Ollie Acheson | | Morristown, NJ| |---| - 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
Tab delimited dump?
Does anyone have a way to export data from a table into a tab delimited text file? Can't seem to see the option in mysqldump. For bonus points - how could I achieve this via PHP?(!) TIA, ollie or-media.com | design | online | interactive | 3d | animation | video +44 (0) 207 394 1072 - 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: Can't import dump file OS X
Thanks Brent, Yes, I too can import with LOAD DATA and mysqlimport, but the thing that's irritating is that I have to create the tables first in order to import the data in either case. With a 'regular' import from a dumped table, mysql should be able to read the SQL statements within the dump file to create the table(s) AND then populate them with the data. Job done in one hit! I'd appreciate if you could try this on your system and let me know how you get on! I've successfully imported a very small dataset (about 10k records) into MySQL under OSX. I'm just getting started in MySQL, so I'm afraid I don't have much to offer except to say it can be done. I'm not sure what syntax you are using in your example. All examples I've seen use the LOAD DATA ... INFILE ... INTO TABLE ... command to get a text file into a database. The alternative is to use the mysqlimport utility if everything that is needed is contained in the text file. Perhaps that points you in the right direction??? - 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
Can't import dump file OS X
Hi all, I'm having a problem importing a dump file in Mac OSX. I created the dump from phpMyAdmin, and tried to import it in these 2 ways with the following results: From mysql command line: Mysql database_name dumped_file; Result: ERROR 1064: You have an error in your SQL syntax near 'database_name dumped_file' at line 1 From /usr/local/mysql/bin directory, using shell command line: shell mysql -uuser_name -p database_name dumped_file Result: I am prompted for a password, which I give correctly. When I go into mysql and SHOW TABLES for the database in question, I get Empty set (0.00 sec) FWIW I have successfully imported the same dump file into our production mySQL server - which is running Red Hat Linux. Any help greatly appreciated! Thanks, ollie - 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
LOAD tblname FROM MASTER (slave)
I saw this command listed on http://www.mysql.com/doc/R/e/Replication_SQL.html LOAD TABLE tblname FROM MASTER However, the same command is not listed on: http://www.mysql.com/doc/L/O/ Is the command very new, because it doesn't seem to work: mysql load table sessions from master; ERROR 1189: Net error reading from master Is it possible to start off replication this way, without having to down the master and to grab a snapshot? If it is supposed to work, what could be a possible reason for that error? The slave is running 3.23.40 and the master is running 3.23.39, in case that makes any difference. Ollie -- Oliver CookSystems Administrator, ClaraNET [EMAIL PROTECTED] 020 7903 3065 - 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