[Labs-l] Temporary tables?

Magnus Manske magnusmanske at googlemail.com
Tue May 28 09:38:57 UTC 2013


Thanks, it works!

Also, couldn't find bugtracker link for labs, so I'll post it here: Table
"globalimagelinks" is not in the commonswiki_p replica.

Thanks,
Magnus


On Mon, May 27, 2013 at 12:08 AM, Tim Landscheidt <tim at tim-landscheidt.de>wrote:

> Magnus Manske <magnusmanske at googlemail.com> wrote:
>
> > Just saw the database replicas for Lab Tools today - great progress!
>
> > Quick (I hope...) question: Can a tool create a temporary table that can
> > "see" a database (e.g. enwiki_p)?
>
> > On the toolserver, I connected to my user database on the "
> > enwiki-p.userdb.toolserver.org" server. How can this be done on labs?
>
> Just connect to enwiki.labsdb.  There you can create data-
> bases with names that begin with your replicated databases
> username (u1234) and two underscores
> (cf.
> https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Creating_databases
> ).
> For example:
>
> | MariaDB [enwiki_p]> CREATE DATABASE u1234__test2;
> | Query OK, 1 row affected (0.03 sec)
>
> | MariaDB [enwiki_p]> CREATE TABLE u1234__test2.test2 (page_id INTEGER);
> | Query OK, 0 rows affected (0.04 sec)
>
> | MariaDB [enwiki_p]> INSERT INTO u1234__test2.test2 (page_id) SELECT
> page_id FROM page WHERE page_id < 1000;
> | Query OK, 381 rows affected (0.03 sec)
> | Records: 381  Duplicates: 0  Warnings: 0
>
> | MariaDB [enwiki_p]>
>
> Tim
>
>
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/labs-l/attachments/20130528/b296a7a1/attachment-0001.html>


More information about the Labs-l mailing list