• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 9301 end: 9400]

world-name: r3wp

Group: MySQL ... [web-public]
Gabriele:
25-Jan-2005
there's some 1% of failures for me to. so far, it hasn't been a great 
problem. but, surely it would be great to be able to solve this issue.
Gabriele:
25-Jan-2005
i just have a retry button in my apps so that's not a problem - but 
sometimes you need to press it.
Gabriele:
25-Jan-2005
on cgi this is more annoying; it happened a couple times on the detective 
builder web interface too.
JaimeVargas:
25-Jan-2005
Off topic question. Is there a way to access the result block of 
query using the field names? Kind of an object for the cursor?
Dockimbel:
25-Jan-2005
Ok, I'll give it a deeper look when I'll release the next version.
Dockimbel:
25-Jan-2005
Didec, does it happen with a single connection attempt or when you 
retry several times (sending lot of connection requests to the server 
in a small delay) ?
Graham:
25-Jan-2005
Got a problem where the server app while in a wait state jumps to 
50% cpu, and memory jumps from 4Mb to 30Mb .. using rugby.
rolf:
25-Jan-2005
On a persistent connection I had only problems when firing requests 
from a scroller driven list. A simple construction to prevent  concurrent 
requests solved the problem:

if not dbBusy [
	dbBusy: true
	mydata: db-read-page fields table start pgLen 
	show mylist
	dbBusy: false
	]
Maxim:
25-Jan-2005
Gabriele, I do exactly the same kind of work arounds, in my apps, 
I just highlight the panes which have failed and include a user-driven 
"refresh button"  but this is not very elegent.. nor is requerying 
until no error is returned...  although I was thinking of adding 
a persistent requery in my  top-level query function.
Maxim:
25-Jan-2005
The server I am accessing is very quick and in general, it accomplishes 
its query in micro seconds.  so its not really a question of server 
load...
Maxim:
25-Jan-2005
Doc.   my very competent db admin, told me that it could simply be 
an issue that the client is expecting a reply from the sql server 
too quickly and that it is likely a simple timeout issue.  HTH.  
 if there is a way to let the tcp wait a bit more, it could be that 
the fraction of a second more needed might be all that is required.
Maxim:
25-Jan-2005
Doc,   for my useage, the access denied error happens 100% randomly. 
   more connections only mean more chances of getting the error, 
but I've had it fail on the very first connection attempt and have 
had several thousand go without errors...   then I'll have 5 within 
a 100 ... there really is no pattern I can detect.
Maxim:
25-Jan-2005
my current app is so threaded because of the async core that its 
impressed everyone at the office... I can be scrolling a list view, 
reading files doing sql queries and reading directory lists which 
buildup view menus in real time... everything is fluding and strangely, 
having sql and a loop browsing through several hundred directories 
scanning their content is almost unnoticeable !!!!!!    scrolling 
speed goes down by maybe 20%... but network access remains pretty 
steady... congrats to RT...
rolf:
26-Jan-2005
@Gab:  no WAIT is used, it is just a wrapper for ease of use.  it 
also selects local db or Rugby
Dockimbel:
26-Jan-2005
Looking at my mysql:// code ('do-handshake and 'read-packet functions), 
I notice that I didn't use any 'wait to synchronize with the server. 
Instead it loops on 'read-io until it gets all the data expected 
which may waste some cpu time. Looking today, I'll say that's not 
the best way to do that, and the code stability could benefit from 
a couple of 'wait calls. I should definitely rewrite the low level 
stuff.
Dockimbel:
26-Jan-2005
Maxim: if you're guessed right on the access denied issue, you should 
be able to fix it by addind a few 'wait 0.01 to the 'do-handshake 
function. Put one 'wait just before each call to 'read-packet and 
if you have time do some tests.
Gabriele:
26-Jan-2005
Doc: problem is we don't know if having WAIT inside handlers is a 
good thing or not
Tim:
18-Feb-2005
a long time..... oops sorry about the errant entry key. Ideas anybody? 
-- tim --
Terry:
18-Feb-2005
try this from your rebol console.. 

do load http://powerofq.com/start
°load° "°mysqlprot°"


a: read join mysql://yourName:[yourPassword-:-localhost]/yourDatabaseName 
"show tables"
Tim:
18-Feb-2005
Here are the results: >> do load http://powerofq.com/start
connecting to: powerofq.com
>> load "mysqlprot"
== mysqlprot
a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"
>> a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"

** Access Error: Invalid port spec: mysql://tim:[password-:-localhost]/hs4ushow 
tables

** Near: a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"
Alberto:
18-Feb-2005
Tim: MySQL 4.1 uses a new encryption method for user passwords, try 
add a new user assigning the password with the function OLD_PASSWORD('pass') 
rather than PASSWORD('pass'), and attempt   open mysql:// ... etc. 
 with the new user. Hope this helps.
Tim:
18-Feb-2005
Do you have a syntax example of that? I added users with the GRANT 
...... IDENTIFIED BY ..... approach
Alberto:
18-Feb-2005
I don't remeber the syntax exactly, wait me a minute...
Tim:
18-Feb-2005
I googled it and added the user as per the OLD-Password syntax. Now 
I tried a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"
and got the same error message
Tim:
18-Feb-2005
I'm going to try it with the mysql-protocol module that I am using 
on my desktop. Just a minute...
Guest:
20-Feb-2005
any idea how to get(read) a string from a integer pointer, delivered 
by mysql.dll ? is there something like  - get-string  :integerpointer 
?
Guest:
22-Feb-2005
yes gabriele, it works fine for this ->  char *mysql_info(MYSQL *mysql) 
 points to a char, but this -> MYSQL_RES *mysql_list_tables(MYSQL 
*mysql, const char *wild) delivers the integer pointer again as string. 
I know I have to provid a struct! which will be filled by passing 
the pointer to the routine but can I pass just a empty block instead 
a struct! ?, or better pass the recieved integer pointer later to 
a block ?
Gabriele:
23-Feb-2005
i think you should declare the return value as a struct. how is MYSQL_RES 
defined?
Gabriele:
23-Feb-2005
anyway, have a look at http://www.compkarori.com/vanilla/display/peek_and_poke.r
Sunanda:
25-Feb-2005
Apologies on Insert -- I'd assumed from the fact you'd asked the 
question that MySQL did not support the Values syntax.


Update is trickier as you are potentially changing a whole load of 
values.

Best way is to have the update data in a 2nd table, and then select 
as appropriate.
DideC:
25-Feb-2005
I have a table with some Products.

I need to copy each line from the Products table in a Command table 
(with a different structure, but same key) IF THEY ARE NOT ALREADY 
THERE, and add a quantity value.
Ashley:
25-Feb-2005
I need to learn SQL more deeply

 A broad introduction can be found here: http://riki-lb1.vet.ohio-state.edu/mqlin/computec/tutorials/SQLTutorial.htm
james_nak:
11-Mar-2005
I'm sure one of you guys knows how to check so that I can avoid:
** Access Error: Port rhm not open
** Where: read-rows
** Near: a: copy db

I think this happens after I have inserted a query and there are 
no results, but in any case I'd like to able to check a port to see 
it is open.
james_nak:
11-Mar-2005
I should add that the code looks like this ...and it works when a 
record is found:
    insert db reduce [s]
	a: copy db
Henrik:
2-May-2005
I have a problem when the connection times out and mysql-protocol.r 
wants to reconnect. It looks like it hangs, but on closer inspection 
with trace/net on just gives an infinite amount of low-level reads 
of length 0 bytes.
Henrik:
2-May-2005
I can close and reopen the connection, and it works again, but I 
can only do this 5-6 times before it refuses to connect to the mysql 
server. Is this a known problem?
Dockimbel:
3-May-2005
You can try to disengage the auto-reconnect feature and test if the 
connection is still active by yourself (send a ping command for example).
Henrik:
6-May-2005
I found a different solution: manually check if the connection has 
timed out 30 seconds after a query and then reconnect. it's not perfect 
since I have to check at every query, but it works to the extent, 
I've tested it
Henrik:
6-May-2005
after the query I store 'now. the next time I do a new query I check 
'now against the stored one. if the difference is more than 30 seconds, 
I close the db connection and open it again immediately
Gabriele:
26-May-2005
Tom: the select above is actually safe. MySQL keeps the last insert 
id on a per-connection basis
Gabriele:
26-May-2005
this means, that even if someone else inserts a record between your 
two queries, you'll get the correct result.
François:
8-Aug-2005
If support for db is gone, what is the point for a professional version 
of rebol??
JaimeVargas:
8-Aug-2005
It is going to become platform. You get access to a plugin API where 
you can plug-in 3rd db modules. (At leass the was the plan from DevCon'04). 
Don't know how things will change in the future. You can still request 
RT to upgrade the drivers.
François:
9-Aug-2005
Ok, but who will develop those modules? Would they be open source? 
Personally, the reason why I love rebol is because it allows me to 
focus on the business, not on the tehnical aspect of a database, 
fastcgi, etc... I am certainly not the one who will develop technical 
modules, simply by lack of knowledge and time. But I really need 
those db access, fastcgi, etc...
JaimeVargas:
9-Aug-2005
It could be RT, or they could come from 3rd parties.  I guess the 
answer is time will tell. You can certainly express your views and 
requests to RT, they may change direction based on customer input. 
However the directions is a bit blurry right now.
Pekr:
19-Aug-2005
Is there any conclusion about DocKimbel's mySQL driver and 4.11 server 
release? Does it work or no? In terms of one project, where we exchange 
data, client agrees to our proposed way, only if we import data to 
their tables on their server. It is Debian linux, mySQL 4.11 or so, 
so before I produce some script and give it to them, I would like 
to ask if the problem of connection/authentication is resolved? Thanks 
a lot ....
Henrik:
23-Aug-2005
I think you can do that. cronjobs are normal scripts that are carried 
out. they reside in a table of cronjobs which basically is a shell 
script with some time and date information added
MikeL:
23-Aug-2005
Hi Petr, 


Not sure if this is what you are asking about mySQL "Can I update 
particular fields (columns) in table?" but if you want to change 
a value you use SET.  e.g.  in mySQL protocol format


query: rejoin[{update logons set rs='}keyOrder{' where userName = 
'}cgi/userName{'}]
insert db reduce query
Thorsten:
28-Aug-2005
I have the new MySQL Version 5 Beta installed on my development Notebook 
(WinXP). I was devoloping a Script acessing a current Version 4.1 
of MySQL without any problems and i thought about continuing dev 
work at home. There i ran into an error saying that the autthetification 
protocol of the client is not supported and i should update my client, 
which is the mysql-protocol from DocKimble, when acessing the local 
version 5 Beta of MySQL. Is this a known problem and does anybody 
knows to work around this?? Does anybody know what changed to authenfication 
that is not supported by the protocol??
Graham:
28-Aug-2005
Guess someone will have to investigate this since dockimbel is busy 
on a contract ...
Thorsten:
28-Aug-2005
Sorry,I tried to search for this topic but could not find a result. 
Perhaps i did not get back far enough. I'll see if i can find out 
something about it. Thanks for the Info.
MikeL:
28-Aug-2005
Re: MySQL Auth.   IIRC  http://dev.mysql.com/doc/mysql/en/old-client.html
I think we used this option "Tell the server to use the older password 
hashing algorithm" and continued without a house call.  If that does 
not work, let me know and on Monday I will ask the programmer who 
did it what did work.
Pekr:
29-Aug-2005
I would like to know the result guys, as I am about to create scripts 
for the partner site, and if I fail, bye bye rebol - the trouble 
simply is - they told us - if you want to sync data to us, prepare 
import utilities for us. So - I would still have to do the job, just 
using php or simply something else - which would be a big time loss, 
as I never used it before ....
Pekr:
30-Aug-2005
I configured my database, then I run into above mentioned problems 
with non ability to use new authentication method. I choosed to use 
old one, but suddenly I can' connect even as a root ;-)
Volker:
30-Aug-2005
Seems one can enable passwords on a per-user-base? search on the 
page: 
mysql> SET PASSWORD FOR
-> ['some_user'-:-'some_host'] = OLD_PASSWORD('newpwd');
Pekr:
31-Aug-2005
what is your common rebol syntax you use mySQL driver with? I find 
it a bit difficult to use Doc's block mode, as I have to provide 
it with exactly the same amount of question marks, as there is amount 
of columns in the table (talking of insert here)
Pekr:
31-Aug-2005
does anyone use non-rebolish, but string mode (eg. using 'compose), 
with direct mySQL syntax? (which allows constructs as for e.g. insert 
into mytable (col1, col8, col9) values ("A", "B", "C") ... so you 
don't need to care about the rest of arguments for e.g.?
MikeL:
16-Sep-2005
This is related, I think, to my notes about VID and MySQL in the 
View section. In a test that we ran in 2004 we were able to load 
1,000,000 rows in under 30 minutes.  We did not investigate further 
but we thought we could improve this by running parallel loads and 
putting it on a real server instead of a laptop.  This volume was 
equal to the annual volume of  the transactions we were interested 
in so would represent a journal of everything that happened to this 
app as a keyed transaction in one year.   


From that 1,000,000 row database, we were able to create an HTML 
report based on some selected criteria in 2.5 seconds.  

All tests done with REBOL View using Doc's mySQL protocol.
Pekr:
8-Jan-2006
I am reopening the issue of mySQL protocol not being able to connect 
to newer >= 4.11 mySQL version database. I decided to consider this 
task as being a proof if the community is, or is not able to effectively 
resort some issues, which clearly show as a show stopper for some 
rebollers (as can be seen on ml). If we are not able to effectively 
resolve this issue, then I have to ask - what actually are we able 
to sort?
Pekr:
8-Jan-2006
maybe this is better description:

The password is saved (in user.password) by using the PASSWORD() 
function in
  mysql.


  This is .c file because it's used in libmysqlclient, which is entirely 
  in C.
  (we need it to be portable to a variety of systems).
  Example:
    update user set password=PASSWORD("hello") where user="test"
  This saves a hashed number as a string in the password field.

  The new authentication is performed in following manner:

  SERVER:  public_seed=create_random_string()
           send(public_seed)

  CLIENT:  recv(public_seed)
           hash_stage1=sha1("password")
           hash_stage2=sha1(hash_stage1)
           reply=xor(hash_stage1, sha1(public_seed,hash_stage2)

           // this three steps are done in scramble() 

           send(reply)

     
  SERVER:  recv(reply)
           hash_stage1=xor(reply, sha1(public_seed,hash_stage2))
           candidate_hash2=sha1(hash_stage1)
           check(candidate_hash2==hash_stage2)

           // this three steps are done in check_scramble()
Pekr:
8-Jan-2006
So - I did some homework here, but I am at my limits (well, maybe 
not, but I will be very slow from now on), whereas we have ppl knowing 
C here, and ppl who did some hashing etc. for Beer (Ladislav), so 
guys, if you find some 10 minutes of spare time, please at least 
try to give me some pointers here. As I said - the world is upgrading 
mySQL to 5.0 now, so 4.11 is older, not to mention 4.0.1 or 3.23. 
It is about having mysql free scheme for rebol, or not. And don't 
think every admin will be willing to set old-password parameter for 
his server, as this can be regarded a security risk ...
Graham:
9-Jan-2006
You have these open source sites where a developer offers to fix 
something for a sum.  The community then collects the money and pays 
the developer.  Whoever needs this, will donate to have this done.
Pekr:
9-Jan-2006
I suggested such model for a long time already. I used it with rebol 
in the past too ... so just - how much, and who does it? :-)
Graham:
9-Jan-2006
There must be quite a few rebol users using mysql.
Graham:
9-Jan-2006
People have to earn a living ..
Pekr:
9-Jan-2006
anton (sorry, can't write capital "a", my keyboard broken :-), the 
trouble is that I can see some ppl frustrated at ml .....
Anton:
9-Jan-2006
I'd be crazy to add this to my schedule now. But ask me in about 
a month and I might look into it then.
Pekr:
9-Jan-2006
maybe this is better description:

The password is saved (in user.password) by using the PASSWORD() 
function in
  mysql.


  This is .c file because it's used in libmysqlclient, which is entirely 
  in C.
  (we need it to be portable to a variety of systems).
  Example:
    update user set password=PASSWORD("hello") where user="test"
  This saves a hashed number as a string in the password field.

  The new authentication is performed in following manner:

  SERVER:  public_seed=create_random_string()
           send(public_seed)

  CLIENT:  recv(public_seed)
           hash_stage1=sha1("password")
           hash_stage2=sha1(hash_stage1)
           reply=xor(hash_stage1, sha1(public_seed,hash_stage2)

           // this three steps are done in scramble() 

           send(reply)

     
  SERVER:  recv(reply)
           hash_stage1=xor(reply, sha1(public_seed,hash_stage2))
           candidate_hash2=sha1(hash_stage1)
           check(candidate_hash2==hash_stage2)

           // this three steps are done in check_scramble()
Volker:
9-Jan-2006
looks like a direct translation of the c-code to me.
Pekr:
9-Jan-2006
simply put - server sends you a "seed", that is stored in 'crypt-seed 
... you then use that seed for your hashing ...
Pekr:
9-Jan-2006
how do I automatically distinguish what version is mySQL communicating 
with me when sending me a seed is unknown to me yet ...
Volker:
9-Jan-2006
On server-side it is marked with a "*" as first char.
Pekr:
9-Jan-2006
I just know that mySQL distinguishes it for itself simply by using 
asterisk as a first char in password ...
Volker:
9-Jan-2006
That article says password-length is given by a count-byte.
Volker:
9-Jan-2006
look for "preceeded with a single byte". yes, length.
Pekr:
9-Jan-2006
yes, hash is 20 bytes long, but server sends you a seed, which is 
shorter ... if I will not be able to distinguish by seed-lenght, 
then I will have to look elsewhere ... will check-on long-password 
constant ...
Volker:
9-Jan-2006
i think so. and a PROTOCOL_41 in a line nearby.
Pekr:
9-Jan-2006
so I have to find a way, how to distinguish, what passwd version 
is stored on the server ... it starts with asterisk, so the server 
easily knows, but seed does not start with asterisk ... which is 
a pity, would be trivial :-)
Pekr:
9-Jan-2006
protocol_41 means a long password?
Volker:
9-Jan-2006
that a 16 skip
Group: XML ... xml related conversations [web-public]
BrianH:
24-Jun-2009
OOP in a prototype-based language with function values instead of 
methods is different. Classes are emulated if need be, but don't 
always need to be. In REBOL even delegation is explicit, unlike most 
other prototype-based object languages.


For the best maintenance use factory functions that create objects 
based on standard specs. Beyond that, different models are better 
for different tasks. Sometimes you assign function values to fields, 
sometimes you use class objects, sometimes class names that are looked 
up at runtime.
Maxim:
24-Jun-2009
I usually creat myself a new function which calls make and the  object 
init (wether class or prototype based)  if that init needs to create 
new inner objects, then its responsible for doing so.


in your case the make-xml-object  could accept an xml string and 
then call make-xml-object recursively for each element it finds.
Graham:
24-Jun-2009
Using your method of creating a special context is going to screw 
up my obj2xml function :(
Sunanda:
24-Jun-2009
One way to do init is as open code in the object....That only "inits" 
the original object, not anything MAKEd from it. But it may be useful 
in some cirumstances, and it does not become part of the object:
    o: make object! compose [print "init" (a: 99) a: 1 b: 2]
Maxim:
24-Jun-2009
so graham... instead of doing: 


; note this is an object, context is a shortcut for make object! 
,  like func is a shortcut for make function!
addressobj: context [
	number: 666
	street: "styx lane"
	city: "pandemonium"
]
pharmacy: context [
	address: make addressobj [ ]
]

you do:

; note this is a block
addressobj: [
	number: 666
	street: "styx lane"
	city: "pandemonium"
]

pharmacy: context [
	address: context addressobj
]
Maxim:
24-Jun-2009
does the xml structure change a lot (lists of data, alternative or 
optional elements, etc) or is it really static?
Maxim:
24-Jun-2009
>> probe load replace {#[object! [a: #[object! [b: #[object! [c: 
"%VALUE%"]]]]]]} "%VALUE%" "tadam!"
make object! [
    a: make object! [
        b: make object! [
            c: "tadam!"
        ]
    ]
]
Graham:
24-Jun-2009
A hack.
Maxim:
24-Jun-2009
my client has a few thousand data types to cope with ;-) rebxml allows 
you to load that up pretty quickly...but not using the xsd obviously.


its parser builds up a string and then loads it.   I found it to 
be quite fast actually.  its MUCH faster than firefox, for example.
Graham:
24-Jun-2009
it's all in a DB.
Maxim:
24-Jun-2009
what I can suggest is that you build your objects like so:

xml-attribute: context [
	name: "someattr"
	value: "somevalue"
]

xml-tag: context [
	name: "FileID"
	content: []  ; a block of inner xml-tag objects
	attributes: [] ; a block of xml-attribute names
]



then all you do is nest objects in objects, filling them up item 
by item recursively using DB data.
Maxim:
24-Jun-2009
the downside is that access either needs a wrapper func, or is done 
via indexes...


actually attributes could be an object, since their names are mutually 
exclusive within an element.
Maxim:
24-Jun-2009
you can just do a mold/all load, that will in effect copy the whole 
tree along with all the series too.
Maxim:
24-Jun-2009
ex:

load mold/all make object! [
    a: make object! [
        b: make object! [
            c: "tadam!"
        ]
    ]
]


will effectively create a complete duplicate of the whole object 
tree.
Graham:
24-Jun-2009
ie. I load a serialized form of the object
Graham:
24-Jun-2009
seems not :(

>> pharmacy: make object! [
[     name: none
[     init: func [ n ][
[          self/name: n
[         ]
[    ]
>> a: load mold/all make pharmacy []
>> probe a
make object! [
    name: none
    init: func [n][
        self/name: n
    ]
]
>> a/init "testing"
** Script Error: self has no value
** Where: init
** Near: self/name: n
Maxim:
24-Jun-2009
if you have a function inside, I think you have to do it instead 
of load it.
Sunanda:
24-Jun-2009
Why not remove the self ? [not a metaphysical question in this context]
    ph: make object! [
        name: none
        init: func [n][
            name: n
        ]
    ]
Graham:
24-Jun-2009
so, I have to  now do

a: do load mold make pharmacy [ ]  ?
Maxim:
24-Jun-2009
a: do mold pharmacy [ ]
9301 / 6460812345...9293[94] 9596...643644645646647