Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
a0bf105b
Commit
a0bf105b
authored
Apr 13, 2000
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Pike strings are NOT muteable!
Rev: src/modules/Msql/msqlmod.c:1.11
parent
b7b7e56c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/Msql/msqlmod.c
+17
-15
17 additions, 15 deletions
src/modules/Msql/msqlmod.c
with
17 additions
and
15 deletions
src/modules/Msql/msqlmod.c
+
17
−
15
View file @
a0bf105b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* This code is (C) Francesco Chemolli, 1997.
* This code is (C) Francesco Chemolli, 1997.
* You may use, modify and redistribute it freely under the terms
* You may use, modify and redistribute it freely under the terms
* of the GNU General Public License, version 2.
* of the GNU General Public License, version 2.
* $Id: msqlmod.c,v 1.1
0 1999
/0
2
/1
0 21:49:01 h
ubb
e
Exp $
* $Id: msqlmod.c,v 1.1
1 2000
/0
4
/1
3 18:37:16 gr
ubb
a
Exp $
*
*
* This version is intended for Pike/0.5 and later.
* This version is intended for Pike/0.5 and later.
* It won't compile under older versions of the Pike interpreter.
* It won't compile under older versions of the Pike interpreter.
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#include
"operators.h"
#include
"operators.h"
#include
"multiset.h"
#include
"multiset.h"
RCSID
(
"$Id: msqlmod.c,v 1.1
0 1999
/0
2
/1
0 21:49:01 h
ubb
e
Exp $"
);
RCSID
(
"$Id: msqlmod.c,v 1.1
1 2000
/0
4
/1
3 18:37:16 gr
ubb
a
Exp $"
);
#include
"version.h"
#include
"version.h"
#ifdef _REENTRANT
#ifdef _REENTRANT
...
@@ -216,18 +216,21 @@ static void msql_mod_create (INT32 args)
...
@@ -216,18 +216,21 @@ static void msql_mod_create (INT32 args)
THIS
->
db_selected
=
0
;
THIS
->
db_selected
=
0
;
}
}
THREADS_ALLOW
();
/* msql won' support specifying a port number to connect to.
/* msql won' support specifying a port number to connect to.
* As far as I know, ':' is not a legal character in an hostname,
* As far as I know, ':' is not a legal character in an hostname,
* so we'll silently ignore it.
* so we'll silently ignore it.
*/
*/
if
(
arg1
)
{
if
(
arg1
)
{
colon
=
strchr
(
arg1
->
str
,
':'
);
colon
=
strchr
(
arg1
->
str
,
':'
);
if
(
colon
)
if
(
colon
)
{
*
colon
=
'\0'
;
arg1
=
make_shared_binary_string
(
arg1
->
str
,
colon
-
arg1
->
str
);
free_string
(
sp
[
-
args
].
u
.
string
);
sp
[
-
args
].
u
.
string
=
arg1
;
}
}
}
THREADS_ALLOW
();
MSQL_LOCK
();
MSQL_LOCK
();
/* Warning! If there were no args, we're deferencing a NULL pointer!*/
/* Warning! If there were no args, we're deferencing a NULL pointer!*/
if
(
!
arg1
||
!
strcmp
(
arg1
->
str
,
"localhost"
))
if
(
!
arg1
||
!
strcmp
(
arg1
->
str
,
"localhost"
))
...
@@ -245,8 +248,7 @@ static void msql_mod_create (INT32 args)
...
@@ -245,8 +248,7 @@ static void msql_mod_create (INT32 args)
}
}
THIS
->
socket
=
sock
;
THIS
->
socket
=
sock
;
THIS
->
connected
=
1
;
THIS
->
connected
=
1
;
if
(
!
arg2
)
if
(
arg2
)
return
;
do_select_db
(
arg2
->
str
);
do_select_db
(
arg2
->
str
);
pop_n_elems
(
args
);
pop_n_elems
(
args
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment