Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread shawn l.green
On 2018-08-18 23:59, shawn l.green wrote: Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so

Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread Mogens Melander
l.green wrote: Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found

Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread shawn l.green
Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found an explanation

what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-13 Thread jeff
Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found an explanation as to *why* that is. Could someone please enlighten me? Thanks

[ANN] ODB C++ ORM 2.4.0 released, adds MySQL stored procedure support

2015-02-11 Thread Boris Kolpackov
I am pleased to announce the release of ODB 2.4.0. ODB is an open source object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any of the mapping code. Major

Re: Stored procedure debuggers

2014-08-21 Thread Johan De Meersman
- Original Message - From: Larry Martell larry.mart...@gmail.com Subject: Stored procedure debuggers Does anyone know of any debuggers for stored procs that run on Mac and/or Linux? Not aware of native ones, but I seem to remember that I managed to get the one that occasionally

Re: Stored procedure debuggers

2014-08-21 Thread Martijn Tonies (Upscene Productions)
Hello Larry, Subject: Stored procedure debuggers Does anyone know of any debuggers for stored procs that run on Mac and/or Linux? Although all our tools are Windows tool, we have customers running Database Workbench under Wine without major problems. We have a standalone debugger tool

Stored procedure debuggers

2014-08-20 Thread Larry Martell
Does anyone know of any debuggers for stored procs that run on Mac and/or Linux? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: Stored Procedure help

2014-07-14 Thread Keith Murphy
@a = 0; UPDATE documents SET sort_id = (@a := @a + 1) WHERE document_category = category ORDER BY sort_id; END // 2014-07-14 11:42 GMT+09:00 Don Wieland d...@pointmade.net: I am trying to create this stored procedure

Re: Stored Procedure help

2014-07-14 Thread Anders Karlsson
= category ORDER BY sort_id; END // 2014-07-14 11:42 GMT+09:00 Don Wieland d...@pointmade.net: I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid

Re: Stored Procedure help

2014-07-14 Thread Mogens Melander
Wieland d...@pointmade.net: I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid` (IN category INT(11)) BEGIN DECLARE a INT; SET a = 0; UPDATE

Stored Procedure help

2014-07-13 Thread Don Wieland
I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid` (IN category INT(11)) BEGIN DECLARE a INT; SET a = 0; UPDATE documents SET sort_id

Re: Stored Procedure help

2014-07-13 Thread kitlenv
maybe try 'order by sort_id desc'? On Mon, Jul 14, 2014 at 12:42 PM, Don Wieland d...@pointmade.net wrote: I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid` (IN category INT(11

Re: Stored Procedure help

2014-07-13 Thread Michael Dykman
Wieland d...@pointmade.net wrote: I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid` (IN category INT(11)) BEGIN DECLARE a INT; SET a = 0; UPDATE

Re: Stored Procedure help

2014-07-13 Thread yoku ts.
GMT+09:00 Don Wieland d...@pointmade.net: I am trying to create this stored procedure, but can't understand why my editor is chocking on it. Little help please: DELIMITER // CREATE PROCEDURE `reset_sortid` (IN category INT(11)) BEGIN DECLARE a INT; SET a = 0; UPDATE

RE: Get Affected Rows after Stored Procedure COMMIT

2013-07-03 Thread Rick James
Affected Rows after Stored Procedure COMMIT Hi, I have a number of INSERT and UPDATE statements in a MySQL Stored Procedure, that works in the form of START TRANSACTION followed by COMMIT. Also I am handling any EXCEPTION. However, after calling COMMIT, how can I get the number of Rows

Get Affected Rows after Stored Procedure COMMIT

2013-07-02 Thread Neil Tompkins
Hi, I have a number of INSERT and UPDATE statements in a MySQL Stored Procedure, that works in the form of START TRANSACTION followed by COMMIT. Also I am handling any EXCEPTION. However, after calling COMMIT, how can I get the number of Rows that were affected either INSERTED or UPDATTED

Re: Get Affected Rows after Stored Procedure COMMIT

2013-07-02 Thread hsv
2013/07/02 12:29 +0100, Neil Tompkins I have a number of INSERT and UPDATE statements in a MySQL Stored Procedure, that works in the form of START TRANSACTION followed by COMMIT. Also I am handling any EXCEPTION. However, after calling COMMIT, how can I get the number of Rows that were

RE: How to return resultset from MySQL Stored Procedure using prepared statement?

2013-03-13 Thread Rick James
What language are you using? In Perl, there is $sth-more_results; -Original Message- From: Girish Talluru [mailto:girish.dev1...@gmail.com] Sent: Wednesday, March 13, 2013 5:24 AM To: mysql@lists.mysql.com Subject: How to return resultset from MySQL Stored Procedure using

RE: Please check the stored procedure

2013-02-14 Thread Peterson, Timothy R
; -Original Message- From: Girish Talluru [mailto:girish.dev1...@gmail.com] Sent: Tuesday, February 12, 2013 1:37 AM To: mysql@lists.mysql.com Subject: Please check the stored procedure DROP PROCEDURE IF EXISTS Cursor_Test;# MySQL returned an empty result set (i.e. zero rows). DELIMITER

Random Code Stored Procedure

2012-12-27 Thread Steffan A. Cline
Rather than trying to reinvent the wheel, I was wondering if anyone might have a stored procedure already for what I want to do. I want to start with 4 characters using any unique combo and when all unique matches are used, it will move to 5 characters and so on. For example in any random order

Re: Stored Procedure Question?

2012-11-23 Thread hsv
to days of execution. I have figured out that the php script does wait for the record to execute and then only after it it will process the next record. For this if it is java I should have used stored procedure and multithreading concept to run multiple threads in parallel. But I don't think PHP

Re: Stored Procedure Question?

2012-11-23 Thread Peter Brawley
when I call a stored procedure does the control get backs immediately to the php script? No, sprocs wil lvery likely slow you down. Probably best to split the job into several part-tasks (i) read rows into a work buffer, (ii) walk the work buffer and mark done rows, (iii) walk the done list

ANN: Hopper (stored procedure debugger), version 1.0.3 released

2012-08-01 Thread Martijn Tonies
ANN: Hopper, version 1.0.3 released Dear ladies and gentlemen, Upscene Productions is proud to announce version 1.0.3 of our product called Hopper. Hopper is a Windows-based Stored Routine and Trigger Debugger, available for InterBase, Firebird and MySQL. This version fixes an imporant

Re: ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-25 Thread Martijn Tonies
Hello Jan, others, I do find your juvenile comments about worshipping, changing product names etc just that. Ah, you must be from the marketing department -- always willing to make friends and influence people. Please, Jan, I'm obviously not, I'm but a simple programmer. And given the fact

Re: ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-23 Thread Jan Steinman
I do find your juvenile comments about worshipping, changing product names etc just that. Ah, you must be from the marketing department -- always willing to make friends and influence people. In examinations, the foolish ask questions that the wise cannot answer. -- Oscar

Re: ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-22 Thread Martijn Tonies
Hello Jan, Can you PLEASE note in your listing when a product is Microsloth-only? While you're at it, can you PLEASE note it prominently on your website? I looked through your product description and saw no specific requirements beyond what databases were supported. It wasn't until I tried

Re: ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-21 Thread Jan Steinman
Can you PLEASE note in your listing when a product is Microsloth-only? While you're at it, can you PLEASE note it prominently on your website? I looked through your product description and saw no specific requirements beyond what databases were supported. It wasn't until I tried to download it

ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-20 Thread Martijn Tonies
ANN: Hopper, version 1.0.1 released Dear ladies and gentlemen, Upscene Productions is proud to announce version 1 of a new product called Hopper. Hopper is a Stored Routine and Trigger Debugger, available for InterBase, Firebird and MySQL. For more information, see

Re: why can not pass constant to stored procedure?

2012-03-10 Thread Antony T Curtis
On 10 Mar, 2012, at 7:06 pm, Cifer Lee wrote: when we call procedure normally we declare the parameter out of the procedure and pass the variable to procedure like this set @x=1; call *a_procedure*(@x); why can not directly pass the digit 1 to the* a_procedure* ? You can pass the

Stored Procedure Debugging?

2012-02-15 Thread Martijn Tonies
Hi all, As you probably now, we created Database Workbench, a developer tool for MySQL and other DBMSses. This tool includes a Stored Routine Debugger for several DBMSses, including Firebird and InterBase, but not MySQL. Both Firebird and InterBase do not provide a debugging API, so our tool

Re: Stored Procedure Debugging?

2012-02-15 Thread Michael Dykman
In my community, interest would be VERY high.  I often counsel putting logic on the server; the biggest point of relunctance is the difficulty debugging.  - michael dykman On Wed, Feb 15, 2012 at 10:45 AM, Martijn Tonies m.ton...@upscene.com wrote: Hi all, As you probably now, we created

Variables in stored procedure

2011-10-04 Thread Adam Gerson
I am getting the error that TABLENAME does not exist. How do I get it to substitute the value stored in TABLENAME, and not the literal string? begin declare v_max int unsigned default 1; declare v_counter int unsigned default 21; declare TABLENAME text; start transaction; while v_counter

Re: Variables in stored procedure

2011-10-04 Thread Peter Brawley
On 10/4/2011 4:20 PM, Adam Gerson wrote: I am getting the error that TABLENAME does not exist. How do I get it to substitute the value stored in TABLENAME, and not the literal string? See the manual page for PREPARE. PB - begin declare v_max int unsigned default 1; declare v_counter

Re: Variables in stored procedure

2011-10-04 Thread luiz rodrigo mottin
you can use: set @sql = concat( INSERT INTO , TABLENAME, VALUES ('309', '0', 'statpress_mincap', 'edit_posts', 'yes')); prepare stm from @sql; execute @sql; 2011/10/4 Adam Gerson agers...@cgps.org I am getting the error that TABLENAME does not exist. How do I get it to substitute the value

Re: Variables in stored procedure

2011-10-04 Thread Adam Gerson
Thanks Luiz, That got me closer. I was able to save the stored proc. It should be execute stm; not execute @sql; right? I get this when I try to execute it: 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

Re: Variables in stored procedure

2011-10-04 Thread luiz rodrigo mottin
PM *Subject: *Re: Variables in stored procedure Thanks Luiz, That got me closer. I was able to save the stored proc. It should be execute stm; not execute @sql; right? I get this when I try to execute it: You have an error in your SQL syntax; check the manual that corresponds to your

Stored Procedure Question

2011-09-21 Thread Brandon Phelps
Hello all, I would like to create a stored procedure that does the following: 1. Accepts 4 values as parameters 2. SELECTS 1 record (LIMIT 1) from a table where the 4 parameters match fields in that table a. If a record was returned then UPDATE the table b. If a record

Re: Stored Procedure Question

2011-09-21 Thread Derek Downey
SELECT id INTO @row_id FROM myTable WHERE blah blah LIMIT 1; Source http://dev.mysql.com/doc/refman/5.5/en/select-into-statement.html On Sep 21, 2011, at 2:23 PM, Brandon Phelps wrote: Hello all, I would like to create a stored procedure that does the following: 1. Accepts 4 values

Re: Stored Procedure Question [SOLVED]

2011-09-21 Thread Brandon Phelps
-into-statement.html On Sep 21, 2011, at 2:23 PM, Brandon Phelps wrote: Hello all, I would like to create a stored procedure that does the following: 1. Accepts 4 values as parameters 2. SELECTS 1 record (LIMIT 1) from a table where the 4 parameters match fields in that table a. If a record

stored procedure insert statement

2011-07-09 Thread Igor Shevtsov
Hi all, I can't explain strange behaviour of the INSERT statement in the stored procedure. The idea is to generate a list based on the output of 3 INNER JOIN of regularly updated tables. Something like : INSERT INTO storage (column list) SELECT column list FROM t1 JOIN t2 ON t1.x=t2.y JOIN t3

Re: stored procedure insert statement

2011-07-09 Thread Johnny Withers
and run the procedure all newly added entries and existed entries are their, but if I add new rows and run the procedure again It doesn't update the table. All tables have a unique identifier, so duplicate errors are impossible. I use INNODB engine for all tables. I understand that stored procedure

Re: stored procedure insert statement

2011-07-09 Thread Claudio Nanni
statement is trying to insert duplicate rows into the storage table. This is why insert ignore and replace work. On Jul 9, 2011 3:49 AM, Igor Shevtsov nixofort...@googlemail.com wrote: Hi all, I can't explain strange behaviour of the INSERT statement in the stored procedure. The idea

Re: stored procedure insert statement

2011-07-09 Thread Igor Shevtsov
into the storage table. This is why insert ignore and replace work. On Jul 9, 2011 3:49 AM, Igor Shevtsov nixofort...@googlemail.com mailto:nixofort...@googlemail.com wrote: Hi all, I can't explain strange behaviour of the INSERT statement in the stored procedure. The idea is to generate

Ranking a table within a stored procedure

2011-03-21 Thread Albart Coster
in my database. My problem is that I am not able to use this simple code within the stored procedure. To overcome this, I iterate through the table following the order defined by the columns datumtijd and number. The code which I use to rank the table within the stored procedure

Re: Stored procedure

2011-01-06 Thread Machiel Richards
() statement. Can anybody give me some ideas as I have tried so many options and yet none of them has worked as yet. Regards Machiel -Original Message- From: petya pe...@petya.org.hu To: Machiel Richards machi...@rdc.co.za Cc: mysql@lists.mysql.com Subject: Re: Stored procedure Date

Stored procedure

2011-01-05 Thread Machiel Richards
Good day all I am hoping that someone can assist me here. As per a client requirement, I am writing a script/stored procedure combination in order to do the following: - Script to be run within a cron once a day according to a set schedule

Re: Stored procedure

2011-01-05 Thread petya
Hi, Use the mysql event scheduler instead of cron, the bash script is quite pointless, and call your stored procedure with now() - interval 1 day parameter. Peter On 01/05/2011 11:00 AM, Machiel Richards wrote: Good day all I am hoping that someone can assist me here

Re: Stored procedure

2011-01-05 Thread Machiel Richards
HI How do I use the mysql event scheduler? I have not used this as yet so not sure how to use it. Regards Machiel -Original Message- From: petya pe...@petya.org.hu To: Machiel Richards machi...@rdc.co.za, mysql@lists.mysql.com Subject: Re: Stored procedure Date: Wed, 05

Re: Stored procedure

2011-01-05 Thread petya
%3cpe...@petya.org.hu%3e *To*: Machiel Richards machi...@rdc.co.za mailto:machiel%20richards%20%3cmachi...@rdc.co.za%3e, mysql@lists.mysql.com mailto:mysql@lists.mysql.com *Subject*: Re: Stored procedure *Date*: Wed, 05 Jan 2011 12:15:59 +0100 Hi, Use the mysql event scheduler instead of cron

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread Shawn Green (MySQL)
On 1/4/2011 23:23, James Dekker wrote: Peter, Thanks for the response! Unfortunately, that worked but a new error arose: check the manual that corresponds to your MySQL server version for the right syntax to use near 'ID = (select max(CONVERT(id_field, signed)) from my_table_t)' at line 1

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread James Dekker
Because some sequence tables contain one to many cardinality and MySQL tables can only have one auto_increment column... Is there a way to do what I am trying to do (obtain max sequence id, set it to its corresponding table, and then increment by one) in a stored function? Happy programming,

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-05 Thread Shawn Green (MySQL)
On 1/5/2011 13:31, James Dekker wrote: Because some sequence tables contain one to many cardinality and MySQL tables can only have one auto_increment column... Is there a way to do what I am trying to do (obtain max sequence id, set it to its corresponding table, and then increment by one) in

Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread James Dekker
or Triggers, so that's why a Stored Procedure was used. As you can see, I am setting up varchars at the parameters and then trying to concatenate them as strings and run them inside prepared statements. Any help would be greatly appreciated... -James -- MySQL General Mailing List For list archives

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread Peter Brawley
to use near 'generate_dynamic_id('my_sequence_id_s', 'my_table_t', 'table_id', @dyn' at line 1. - For some odd reason, dynamic function calls are not allowed in Stored Functions or Triggers, so that's why a Stored Procedure was used

Re: Trying to Generate Dynamic Sequence IDs as Stored Function or Stored Procedure.

2011-01-04 Thread James Dekker
' at line 1. - For some odd reason, dynamic function calls are not allowed in Stored Functions or Triggers, so that's why a Stored Procedure was used. As you can see, I am setting up varchars at the parameters and then trying

stored procedure syntax error

2010-07-01 Thread DAREKAR, NAYAN (NAYAN)
Hi all ! I m getting an error while writing stored procedure, the code is as below and error CODE -- DELIMITER $$ DROP PROCEDURE IF EXISTS `aaa` $$ CREATE definer=`ro...@`%mailto:definer=`ro

Re: stored procedure syntax error

2010-07-01 Thread Nilnandan Joshi
DAREKAR, NAYAN (NAYAN) wrote: Hi all ! I m getting an error while writing stored procedure, the code is as below and error CODE -- DELIMITER $$ DROP PROCEDURE IF EXISTS `aaa` $$ CREATE definer=`ro

Re: Replication of MySQL Stored Procedure

2010-06-08 Thread Suresh Kuna
[mailto:sabika.makhd...@gmail.com] Sent: Monday, June 07, 2010 11:14 AM To: mysql@lists.mysql.com Subject: Replication of MySQL Stored Procedure Hi! I have a database in the wild ignore table as table.%. Recently I created a store procedure on it and it replicated. Does any one know if this is normal

Re: Replication of MySQL Stored Procedure

2010-06-08 Thread Manasi Save
Stored Procedure Hi! I have a database in the wild ignore table as table.%. Recently I created a store procedure on it and it replicated. Does any one know if this is normal bahvior? If I wanted to make sure store procedures do not replicate, what should I do? -- MySQL

Re: Strange behavior by MySQL Stored Procedure

2010-06-07 Thread Manasi Save
Does anyone have any sort of any idea on how to deal with this problem? This is happening again and again and not all the time but randomly anytime.--Regards,Manasi Save On Wed, 02 Jun 2010 06:46:56 -0400, Manasi Save wrote: Dear Venugopal,Here's theSample Java Code Which Calls stored procedure

Replication of MySQL Stored Procedure

2010-06-07 Thread Sabika Gmail
Hi! I have a database in the wild ignore table as table.%. Recently I created a store procedure on it and it replicated. Does any one know if this is normal bahvior? If I wanted to make sure store procedures do not replicate, what should I do? -- MySQL General Mailing List For list

RE: Replication of MySQL Stored Procedure

2010-06-07 Thread Rolando Edwards
-660-3221 (Cell) AIM Skype : RolandoLogicWorx redwa...@logicworks.net http://www.linkedin.com/in/rolandoedwards -Original Message- From: Sabika Gmail [mailto:sabika.makhd...@gmail.com] Sent: Monday, June 07, 2010 11:14 AM To: mysql@lists.mysql.com Subject: Replication of MySQL Stored

Re: Replication of MySQL Stored Procedure

2010-06-07 Thread Sabika Gmail
-Original Message- From: Sabika Gmail [mailto:sabika.makhd...@gmail.com] Sent: Monday, June 07, 2010 11:14 AM To: mysql@lists.mysql.com Subject: Replication of MySQL Stored Procedure Hi! I have a database in the wild ignore table as table.%. Recently I created a store procedure

Re: Strange behavior by MySQL Stored Procedure

2010-06-02 Thread Manasi Save
Dear Venugopal,Here's theSample Java Code Which Calls stored procedure :-//get the connection to databaseConnection dbConnection = getConnection();//create the call for procedureString procedureCallStmtStr = "Call XYZ()";//create callable statement objectCallableStatement cs = conn.p

Re: Strange behavior by MySQL Stored Procedure

2010-05-31 Thread Manasi Save
mysql Version :- 5.1.42-community-log mysql Connector/J Version :-  mysql-connector-java-5.1.6-bin.jar   Sample Java Code Which Calls stored procedure :-    //get the connection to database Connection dbConnection = getConnection();   //create the call for procedure String procedureCallStmtStr

Re: Strange behavior by MySQL Stored Procedure

2010-05-31 Thread Venugopal Rao
: From: Manasi Save manasi.s...@artificialmachines.com Subject: Strange behavior by MySQL Stored Procedure To: mysql@lists.mysql.com Date: Friday, 28 May, 2010, 5:44 PM Dear All,   I have one stored procedure Which inserts data into one table.   But sometimes it does not insert record

Strange behavior by MySQL Stored Procedure

2010-05-28 Thread Manasi Save
Dear All, I have one stored procedure Which inserts data into one table. But sometimes it does not insert record. This happens when I called it from java application. But If I called same query from mysql command line. It executes successfully. Also I have one procedure which only retrieves

Re: Strange behavior by MySQL Stored Procedure

2010-05-28 Thread Mattia Merzi
2010/5/28 Manasi Save manasi.s...@artificialmachines.com: [...] Or am I doing something wrong? probably; you better send us another e-mail writing at least: - mysql version you are using - mysql Connector/J version you are using - piece of java code you are using to call the stored procedure

Re: Strange behavior by MySQL Stored Procedure

2010-05-28 Thread Anirudh Sundar
and few records from the query executed. Cheers, Anirudh Sundar 9594506474 DataVail Mumbai. On Fri, May 28, 2010 at 5:44 PM, Manasi Save manasi.s...@artificialmachines.com wrote: Dear All, I have one stored procedure Which inserts data into one table. But sometimes it does not insert record

Stored Procedure/Function Question

2010-02-17 Thread Steve Staples
Hi there, I have a WEIRD question, that I can't find an answer too... Here is my stored function: DELIMITER $$ USE `mydatabase`$$ DROP FUNCTION IF EXISTS `SPLIT_STR`$$ CREATE definer=`thisus...@`%` FUNCTION `SPLIT_STR`( X VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR(255)

Get count of number of lines from mysql stored procedure

2010-02-17 Thread Manasi Save
Hi All,I want to find out number of lines are there in all stored procedure written.Is it possible to get the number of lines using a SQL query.Thanks in advance. -- Regards, Manasi Save

Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Walton Hoops
Hi all. I am running into a very frustrating problem trying to created a stored procedure. I had originally assumed I was using bad syntax, but even examples copied and pasted directly from the manual are giving the same error. mysql CREATE DEFINER = 'walton'@'localhost' PROCEDURE

RE: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Gavin Towey
-Original Message- From: Walton Hoops [mailto:wal...@vyper.hopto.org] Sent: Wednesday, December 16, 2009 10:46 AM To: mysql@lists.mysql.com Subject: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10 Hi all. I am running into a very frustrating

RE: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Walton Hoops
-Original Message- From: Walton Hoops [mailto:wal...@vyper.hopto.org] Hi all. I am running into a very frustrating problem trying to created a stored procedure. I had originally assumed I was using bad syntax, but even examples copied and pasted directly from the manual

stored procedure and random table name - temp table, merge, prepared statement

2009-12-10 Thread Dante Lorenso
All, I have a stored procedure that I'm writing where I need to run a lot of queries against a particular table. The name of the table will be a parameter to the stored procedure ... example: CALL normalize_data('name_of_table_here'); Since I want to run queries against this table, I don't

RE: stored procedure and random table name - temp table, merge, prepared statement

2009-12-10 Thread Gavin Towey
@lists.mysql.com Subject: stored procedure and random table name - temp table, merge, prepared statement All, I have a stored procedure that I'm writing where I need to run a lot of queries against a particular table. The name of the table will be a parameter to the stored procedure ... example: CALL

Re: stored procedure and random table name - temp table, merge, prepared statement

2009-12-10 Thread D. Dante Lorenso
(); +--+ | version()| +--+ | 5.1.41-community | +--+ 1 row in set (0.00 sec) Here is my stored procedure: 8 CREATE PROCEDURE `test_massage_table`(IN in_table_name VARCHAR(64)) NOT DETERMINISTIC MODIFIES SQL

Select from remote server from stored procedure

2009-12-09 Thread Steven Staples
Ok, I feel silly for asking this, but I am going to do it anyway. I have a huge stored procedure that does quite a bit of logic, and gathering/splitting of data. I currently have our customer database on one server, and our logging on another. What i need to do, is to pull the customer id from

RE: Select from remote server from stored procedure

2009-12-09 Thread Neil Aggarwal
Is this possible to do? To make a connection, inside the stored procedure to a completely different machine and access the mysql there? The only way I know to access tables from different servers from a single connection is federated tables: http://dev.mysql.com/doc/refman/5.0/en/federated

Re: Select from remote server from stored procedure

2009-12-09 Thread Johan De Meersman
? To make a connection, inside the stored procedure to a completely different machine and access the mysql there? The only way I know to access tables from different servers from a single connection is federated tables: http://dev.mysql.com/doc/refman/5.0/en/federated-use.html Once you do

Re: Select from remote server from stored procedure

2009-12-09 Thread Harrison Fisk
be fine. It is still not as fast as local access, but it's not as bad as always doing a full table scan remotely. On Wed, Dec 9, 2009 at 4:13 PM, Neil Aggarwal n...@jammconsulting.comwrote: Is this possible to do? To make a connection, inside the stored procedure to a completely

RE: Select from remote server from stored procedure

2009-12-09 Thread Steven Staples
remote server from stored procedure Hello Johan, On Dec 9, 2009, at 11:22 AM, Johan De Meersman wrote: Posted this before, but beware: federated tables do NOT use indices. Every select is a full table scan, and if you're talking about a logging table that could become very expensive very fast

RE: Select from remote server from stored procedure

2009-12-09 Thread Neil Aggarwal
Steve: I suppose maybe making this a slave table to the other server... nah... lots of work there Setting your local server to be a slave of the remote server is not too hard and would be a MUCH better solution. The steps are fairly staightforward: 1. Add a slave user to the remote

Re: Stored Procedure Data Types

2009-05-22 Thread Janek Bogucki
Hi, Use a temporary table to store the ids and join to it for the final update? That will at least avoid an error when the cursor selects zero records. Cheers, -Janek On Wed, 2009-05-20 at 16:05 -0400, W. Scott Hayes wrote: Hello, I would like to do a select on a table to get back the IDs

Stored Procedure Data Types

2009-05-20 Thread W. Scott Hayes
Hello, I would like to do a select on a table to get back the IDs of some of the records. Then take those IDs and do a single update using a WHERE clause like (recordID IN (2,44,21)) My question is: Can I build a string using a cursor that has all of the IDs and then issue an update using the

Re: Log querys from stored procedure

2009-05-03 Thread Shawn Green
Hello Mauricio, Mauricio Tellez wrote: Hi, I'm trying to debug a stored procedure. This SP has a few queries and also call another SP. I'm starting mysql with the --log=my_queries.log but I found that mysql only log the call my_sp(param1, param2) but don't log any query inside my_sp neither log

Log querys from stored procedure

2009-04-29 Thread Mauricio Tellez
Hi, I'm trying to debug a stored procedure. This SP has a few queries and also call another SP. I'm starting mysql with the --log=my_queries.log but I found that mysql only log the call my_sp(param1, param2) but don't log any query inside my_sp neither log the nested SP call. By the way, how can I

Re: facing problem with is null in stored procedure

2009-04-12 Thread syed basha
hai shawn green, thanks for ur response.My situation is to generate a production plan.for this I collect the data from sales orders and compare the stock availability in rthe warehouse and if the stock is less than the ordered quantity I plan for production and for this I have to issue

Re: facing problem with is null in stored procedure

2009-04-11 Thread Shawn Green
syed basha wrote: delimiter // create procedure sample1(in p_item varchar(30), in p_size varchar(6), in p_quantity decimal(10,3), in p_unit varchar(3), in p_autoincrement varchar(30), out v_mess varchar(50) ) begin declare done int default 0; declare v_bhqty decimal(10,3);

facing problem with is null in stored procedure

2009-04-09 Thread syed basha
delimiter // create procedure sample1(in p_item varchar(30), in p_size varchar(6), in p_quantity decimal(10,3), in p_unit varchar(3), in p_autoincrement varchar(30), out v_mess varchar(50) ) begin declare done int default 0; declare v_bhqty decimal(10,3); declare v_bhunit

how can i determine default database within a stored procedure?

2009-03-24 Thread Jim Lyons
() | ++ | mysql | ++ However, if the database function is invoked from within a stored procedure, it only returns the name of the database in which it exists: use scratch; delimiter $$ create procedure thisdb() begin select database(); end$$ delimiter ; use scratch; call

Re: how can I make a stored procedure executable by public?

2009-03-18 Thread Claudio Nanni
Hello Jim, If I unserstand well your needs the steps you need to do are: Create one user X with insert privileges on the mydb.audit_table Create the stored procedure specifying the user X both in the DEFINER section and in the SQL_SECURITY section of the create procedure statement ( http

Re: how can I make a stored procedure executable by public?

2009-03-18 Thread Jim Lyons
18, 2009 at 6:42 AM, Claudio Nanni claudio.na...@gmail.comwrote: Hello Jim, If I unserstand well your needs the steps you need to do are: Create one user X with insert privileges on the mydb.audit_table Create the stored procedure specifying the user X both in the DEFINER section

Re: how can I make a stored procedure executable by public?

2009-03-18 Thread Claudio Nanni
needs the steps you need to do are: Create one user X with insert privileges on the mydb.audit_table Create the stored procedure specifying the user X both in the DEFINER section and in the SQL_SECURITY section of the create procedure statement (http://dev.mysql.com/doc/refman

Re: how can I make a stored procedure executable by public?

2009-03-18 Thread Jim Lyons
claudio.na...@gmail.commailto: claudio.na...@gmail.com wrote: Hello Jim, If I unserstand well your needs the steps you need to do are: Create one user X with insert privileges on the mydb.audit_table Create the stored procedure specifying the user X both in the DEFINER section

how can I make a stored procedure executable by public?

2009-03-17 Thread Jim Lyons
I am writing a tracking procedure that will be inserted into every procedure (regardless of who writes the procedure) that will insert a record into an audit table. This means the procedure, regardless of who writes it, must have the permission to insert into the table. I am going to modify the

how can trace stored procedure usage?

2009-01-26 Thread Jim Lyons
I am trying to track the usage of stored procedures on our system. My solution so far is to parse the general log for call queries. This works well for procedures that are called from the command line, but the general log does not seem to report procedures called from within other procedures.

RE: how can trace stored procedure usage?

2009-01-26 Thread Martin Gainty
of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Mon, 26 Jan 2009 11:01:58 -0600 Subject: how can trace stored

Question on returning multiple rows from a stored procedure into a session variable

2008-12-24 Thread Vikram Vaswani
Hi Is there a way to write a stored procedure that returns a result set containing multiple rows? More specifically, I'm trying to return the multi-row result set as an OUT parameter, which I can then access via a session variable. If this is possible, could someone direct me

  1   2   3   4   >