#maria Log v0.1

logs Catalogue

This page loads from the db, refresh as and when. It displays 24 hrs
For older data http://marialog.archivist.info/previous.php, logs go back to 2009-01-18
Some user stats
Table logs
date_time
user
message
2014-12-20 18:00:58
jeffreylevesque
could someone suggest to me a better way of writing the following code - https://github.com/jeff1evesque/machine-learning/issues/730
2014-12-20 18:01:28
jeffreylevesque
is there an inherit way to parameterize my query directly in mariadb
2014-12-20 18:05:05
Jb_boin
dont use datetime from python but use NOW() on SQL, in most cases its better to use directly the SQL server time and not the one from the server processing the script
2014-12-20 18:31:41
jeffreylevesque
Jb_boin: is NOW() UTC time?
2014-12-20 18:32:05
jeffreylevesque
i'm really curious how i can replace my usage of `%` in my queries
2014-12-20 18:33:09
jeffreylevesque
I was told in #mysql to use prepared statements
2014-12-20 18:33:47
Jb_boin
now i the actual unix timestamp, you get the timezone you want when doing select
2014-12-20 18:34:49
Jb_boin
and prepared statements are cleaner but i dont know python enough to help you more precisely on the syntax
2014-12-20 18:35:13
jeffreylevesque
Jb_boin: since this issue, i'm using `datetime.utcnow()`
2014-12-20 18:35:34
jeffreylevesque
not `datetime.now()`. which basically implements UTC time
2014-12-20 18:36:01
jeffreylevesque
i will google for mysql prepared statements in python
2014-12-20 18:38:04
Jb_boin
but if the column type is datetime you should use NOW() on your insert/update query to avoid possible problems if you have for example multiple frontend servers that have not their clock correctly set you could end up with different rows having datetime wrongly ordered or if you for example do time/date calculations in SQL it will be better to do it with datas that have been inserted using the server time itself
2014-12-20 18:39:10
jeffreylevesque
Jb_boin: UTC time is a standard without timezones, at least that's what i had thought
2014-12-20 18:39:11
Jb_boin
or if the query is prepared/calculated a long time before being executed
2014-12-20 18:39:36
jeffreylevesque
ok, i will try to find an equivalent of `utcnow()` in mysql/mariadb
2014-12-20 18:40:03
Jb_boin
jeffreylevesque, yes but its not the issue here, its about getting the time from your script (python in your case) vs telling the sql server to insert the actual timestamp when executing the query
2014-12-20 18:40:21
jeffreylevesque
gotcha
2014-12-20 18:40:22
Jb_boin
its NOW()
2014-12-20 18:40:34
jeffreylevesque
is NOW() utc time?
2014-12-20 18:41:03
jeffreylevesque
UTC_TIMESTAMP
2014-12-20 18:41:11
jeffreylevesque
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_utc-timestamp
2014-12-20 18:41:16
jeffreylevesque
that the same in mariadb?
2014-12-20 18:42:22
Jb_boin
yes
2014-12-20 18:44:15
Jb_boin
for a select, now() return the timestamp using by default the system timestamp (you can specify another one) but for an insert/update it should be the same as utc_timestamp
2014-12-20 18:45:19
jeffreylevesque
Jb_boin: thank you, made an issue - https://github.com/jeff1evesque/machine-learning/issues/736
2014-12-20 23:52:07
drilorin
Hi guys, anyone up for a quick MariaDB + Galera + xtrabackup-v2 question?
2014-12-20 23:56:56
drilorin
oh well it was worth a try, I will check in again at another time :)
2014-12-21 00:22:59
wazyl
running mysqldump -u root -p mydb > mydb.sql - just sits there, hangs, 5.5.37-MariaDB, any thoughts on what my best course of action might be ?
2014-12-21 00:27:35
Jb_boin
check if the file still gets modified and if not the last line of it and the processlist of mariadb and also the error log if there is something
2014-12-21 00:28:28
Jb_boin
and simply verify that the partition is not full
2014-12-21 00:29:55
wazyl
the file, is 0 bytes in length, the error log shows nothing
2014-12-21 00:32:54
wazyl
do notice an error with respect to the user table being marked as crashed and should be repaired, and I'll now try to mysqlrepair -A --auto-repair / -o , to see if that cleans it up.
2014-12-21 00:41:09
write_erase
Hi. I'm playing with MariaDB 10 and 'ALTER ONLINE TABLE XXXX FORCE'.
2014-12-21 00:41:14
write_erase
AFAIK, it rebuilds the whole table without locking like an ONLINE OPTIMIZE. Right ?
2014-12-21 00:42:17
wazyl
alright, so after running mysqlcheck --auto-repair --check , i was able to take a dump... feels great.
2014-12-21 01:46:33
crosswaller
Hi,all ,have a little confuse:declare cur1 CURSOR FOR SELECT startTime from t_time_def where timetype = '1'; not work,only get the first row;when i remove the where timetype = '1',it works.Conclusion:Mariadb`cursor can not work with "where"
2014-12-21 02:17:33
crosswaller
Asensitive: Means cursor can not create copy of table. In MySQL cursor just traverse on every row of the table or result set.
2014-12-21 02:17:43
crosswaller
WHAT THIS MEAN?
2014-12-21 02:41:59
Digipeng
hi I'm looking for a gui front end for Mariadb for fedora that's not web server based.
2014-12-21 02:43:09
dltl
libreoffice isn't bad - not perfect though
2014-12-21 02:43:50
Digipeng
it actually is a graphic gui
2014-12-21 02:43:52
Digipeng
ok
2014-12-21 02:45:49
dltl
you don't want phpmyadmin huh?
2014-12-21 02:46:34
Digipeng
running a webserver now just opens up a can of worms.
2014-12-21 02:47:22
dltl
why ? apache is real easy to run as localhost
2014-12-21 02:48:02
dltl
or run on an ethernet ip and have available for lan and then wan with port forwarding ... see how it gets there
2014-12-21 02:49:04
dltl
the only problem with libreoffice i found is you need to start making the database intially with libreoffice and all is good after that
2014-12-21 03:13:29
Digipeng
looks like httpd is still installed
2014-12-21 03:14:32
Digipeng
I'll look at the webserver gui then
2014-12-21 03:14:33
thumbs
one would question why the mysql client doesn't suffice, as well.
2014-12-21 03:14:53
Digipeng
used to gui
2014-12-21 04:05:17
crosswaller
Is DECLARE CURSOR works for mariadb function
2014-12-21 04:05:18
crosswaller
?
2014-12-21 04:31:34
crosswaller
DECLARE CONTINUE HANDLER FOR NOT FOUND SET @done = TRUE; OPEN cur1; read_loop:LOOP FETCH cur1 INTO x; IF @done THEN LEAVE read_loop; END IF; why this loop only once?it return the first row only!!!
2014-12-21 04:38:30
seekwill
Because @done evaluates to true?
2014-12-21 04:50:26
crosswaller
seekwill:i find out the problem,,the function can be executed normally only once,,after that the done was set to be TRUE in the same session..so the loop will be executed only once...
2014-12-21 04:51:05
crosswaller
seekwill: Is there any way to release the variable @done after each execution
2014-12-21 06:12:37
danblack
danblack waves to csmart
2014-12-21 06:46:28
danblack
danblack waves to csmart
2014-12-21 06:54:38
seekwill
seekwill punches csmart for danblack
2014-12-21 06:54:53
danblack
:-(
2014-12-21 06:55:25
seekwill
He was ignoring you!
2014-12-21 06:55:37
danblack
was an accidential repeat. mistool irc for another work terminal where it was keyup and return.
2014-12-21 06:55:48
seekwill
oops!
2014-12-21 07:02:02
danblack
seekwill: breaking anything interesting?
2014-12-21 15:05:29
crosswaller
i need to create a temporary table dynamically,,the number of columns should be created according to the parameter..any suggestion to make it ?