Do you know how many unique variants can we reach using 12 words length phrase of vocabulary of 2048 words if we will allow words repeating?

|
🦹🏻‍♂️ 2021-04-10 20:41:10
piterden 2021-04-10 20:39:27
Yebat’ ne uznal tyebia v maske

Ahah, so true))

MasterZiv 2021-04-10 23:26:02
🦹🏻‍♂️ 2021-04-10 19:48:18
guys, hello, got a tricky (probably) question.

Got mariadb mysql v8.5+ (cant remember straight) innodb AFAIK
Is it possible to declare and use cursors with recursive cte?
I tried this, but can’t get rid of syntax errors, and no im not banned on google – i couldn’t find whether this is totally impossible or any working examples.

Based on docs – it is possible.

My target is to grab non-existent intervals from binary heap table to later traverse through those intervals

DECLARE levels_looper cursor FOR
WITH RECURSIVE nodes_levels(level, nodemin,nodemax) AS (
SELECT 2, subtree_root_node_id*2, subtree_root_node_id*2+1
UNION ALL
SELECT level + 1, pow(2,level)*subtree_root_node_id, pow(2,level)*subtree_root_node_id+pow(2,level)-1
FROM nodes_levels
WHERE level <= levels_total+1)
SELECT level-1,nodemin,nodemax from nodes_levels;

If you have errors , probably your MySQL flavor doesn’t support recursive CTE…
Check the docs about your particular flavor and version

🦹🏻‍♂️ 2021-04-10 23:41:34
MasterZiv 2021-04-10 23:26:02
If you have errors , probably your MySQL flavor doesn’t support recursive CTE…
Check the docs about your particular flavor and version

supports, i checked

MasterZiv 2021-04-10 23:44:41
🦹🏻‍♂️ 2021-04-10 23:41:34
supports, i checked

Well then your yeah is just read docs and implement it properly

🦹🏻‍♂️ 2021-04-10 23:45:09
i couldn’t find correct implementation of recursive cte through cursor
🦹🏻‍♂️ 2021-04-10 23:45:30
it is actually the meaning of my question
🦹🏻‍♂️ 2021-04-10 23:45:37
second one
piterden 2021-04-10 23:46:39
Два англичанина, блин. Идите уже в русский чат
🦹🏻‍♂️ 2021-04-10 23:47:21
Is it necessary?
piterden 2021-04-10 23:47:36
No, as you wish
piterden 2021-04-10 23:49:33
If you both do like to use your limited vocabulary for solving non-existent issues, you may wish to stay
🦹🏻‍♂️ 2021-04-10 23:52:00
u sound really passive-agressive here. First of all please do not assume limitations of our available vocabulary, second – issue is not non-existent.
🦹🏻‍♂️ 2021-04-10 23:52:14
Thanks in advance
piterden 2021-04-10 23:54:38
🦹🏻‍♂️ 2021-04-10 23:52:00
u sound really passive-agressive here. First of all please do not assume limitations of our available vocabulary, second – issue is not non-existent.

Despite on it, you still can’t clearly explain your problem.

🦹🏻‍♂️ 2021-04-10 23:55:02
pun intended?
piterden 2021-04-10 23:56:53
What is the difference between storage limit 10e63 and 10e65, if you are anyway don’t have even one percent of that data count?
🦹🏻‍♂️ 2021-04-10 23:58:31
piterden 2021-04-10 23:56:53
What is the difference between storage limit 10e63 and 10e65, if you are anyway don’t have even one percent of that data count?

Anyway i already laid the problem out. Recursive cte in the cursor select and its possibility. I already read suggested listings and info – no solutions.

Answering your question – it isn’t necessary for the problem. Actually it just suggests that entities in the given data structures could have only 6365 descendants in hierarchy

🦹🏻‍♂️ 2021-04-10 23:58:47
there could be such depth in one branch
piterden 2021-04-11 00:00:13
I take a risk to imagine your calculation is incorrect
piterden 2021-04-11 00:05:23
Do you know how many unique variants can we reach using 12 words length phrase of vocabulary of 2048 words if we will allow words repeating?
piterden 2021-04-11 00:09:21
Such phrase will be proposed to you to write right after new bitcoin wallet creation. The private key can be encoded there
piterden 2021-04-11 00:12:02
Now I want to sound another one interesting fact about bitcoin and cryptocurrency: a new wallet creation is absolutely OFFLINE operation.
piterden 2021-04-11 00:14:10
So there’s not any validation and any protection of someone would create a new wallet which already would have money on its balance.
piterden 2021-04-11 00:16:50
It is easy to calculate that we have 2048^12 variants and a half people in our world who using BTC at least one time
piterden 2021-04-11 00:19:27
We talking about 5.4×10^54
piterden 2021-04-11 00:20:16
And you are told me about 10^64
piterden 2021-04-11 00:21:47
All your life long will never be enough to create such amount of rows in DB
🦹🏻‍♂️ 2021-04-11 00:22:33
It wouldn’t be populated totally
piterden 2021-04-11 00:23:22
If so, you will not need something bigger than bigint
🦹🏻‍♂️ 2021-04-11 00:23:24
I just use such variant for fast traversing and calculatuon of node_id
piterden 2021-04-11 00:23:54
It makes no sense
piterden 2021-04-11 00:28:06
🦹🏻‍♂️ 2021-04-11 00:23:24
I just use such variant for fast traversing and calculatuon of node_id

You can easily calculate that result and do not need to populate DB tables

piterden 2021-04-11 00:28:44
Even if you did it you will reach nothing
2021-04-12 10:33:27
In our environment, we had a host reboot and MySQL got shutdown without clean and while startup we had error of tablespace and in log stated for innnodb force recovery.

How much time it will take ?
Any idea. It is in innnodb force recovery=0

2021-04-12 10:34:24
It was started 10am today. Means 3 hours back. Still no log is there
|