Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
da3775a2
Unverified
Commit
da3775a2
authored
Nov 09, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
♻
#12568
parent
e98a911c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/main/java/org/b3log/solo/service/InitService.java
src/main/java/org/b3log/solo/service/InitService.java
+7
-3
No files found.
src/main/java/org/b3log/solo/service/InitService.java
View file @
da3775a2
...
...
@@ -52,6 +52,7 @@ import org.json.JSONObject;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -169,10 +170,13 @@ public class InitService {
}
try
(
final
Connection
connection
=
Connections
.
getConnection
())
{
final
PreparedStatement
preparedStatement
=
connection
.
prepareStatement
(
"SELECT 1 FROM `"
+
userRepository
.
getName
()
+
"` WHERE 1 = 2"
);
preparedStatement
.
execute
();
final
PreparedStatement
preparedStatement
=
connection
.
prepareStatement
(
"SELECT COUNT(1) AS `c` FROM `"
+
userRepository
.
getName
()
+
"`"
);
final
ResultSet
resultSet
=
preparedStatement
.
executeQuery
();
resultSet
.
next
();
final
int
c
=
resultSet
.
getInt
(
"c"
);
inited
=
0
<
c
;
return
inited
=
true
;
return
inited
;
}
catch
(
final
Exception
e
)
{
if
(!
printedInitMsg
)
{
LOGGER
.
log
(
Level
.
WARN
,
"Solo has not been initialized, please open your browser and visit ["
+
Latkes
.
getServePath
()
+
"] to init Solo"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment