List:General Discussion« Previous MessageNext Message »
From:(Hal Date:August 29 2011 2:52am
Subject:Re: Arrays
View as plain text  
>>>> 2011/08/28 09:36 +0200, Johan De Meersman >>>>
No: when you use /create temporary table/, the table is local to your connection. You can
perfectly open a dozen connections and have them all create a temporary table called
intermediate_results, they'll not interfere with one another. Temporary tables also get
automatically dropped when the connection closes - although it's of course best practice
to do it yourself as soon as you don't need it any longer :-)
<<<<<<<<
No, I meant that in MySQL there is no means of passing a table-name to a routine, nor
returning one; therefore, the only means of handling a table within a routine and without
is with a global name; that is, one used but not declared within the routine--and "CREATE
[TEMPORARY] TABLE" never declares a variable local to a routine. As for the returned
array, if there were one, that would be stored in a variable that is lost with the
connection.

I wrote an edit-distance function, and two procedures, that use temporary table for array.
The procedures s outcome was in the temporary tables. In routines there are table-use
restrictions, more in functions than procedures, and I so wrote my function because of
them.

Thread
Arraysjavad bakhshi24 Aug
  • Re: Arrayshsv26 Aug
    • Re: ArraysJohan De Meersman26 Aug
      • Re: Arraysjavad bakhshi26 Aug
        • Re: ArraysMichael Dykman27 Aug
        • Re: Arrayshsv27 Aug
          • Re: ArraysArthur Fuller27 Aug
            • Re: ArraysJohan De Meersman28 Aug
          • Re: ArraysJohan De Meersman28 Aug
            • Re: Arrayshsv29 Aug
          • Re: ArraysMichael Dykman28 Aug
          • Re: ArraysMySQL)29 Aug
            • Re: Arraysjavad bakhshi2 Sep
              • Re: ArraysMySQL)2 Sep
                • Re: Arraysjavad bakhshi2 Sep
                  • Re: Arrayshsv2 Sep